-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent support for PNG image #2048
Comments
This looks at least related to #1138. Although I've updated to the latest releases of Gatsby (and plugins) and I'm still seeing PNG image types treated differently than eg .jpg and .gif. |
Hmmm @chiedo worked on adding support for tags. Wonder why that's not working. We don't generate responsive markup for gifs as there's not an easy way afaik to resize gifs so they just get copied over. |
Would be great to be able to embed PNGs via There's also some weird nested syntax (eg in files like this) that isn't compatible with the markdown flavor of image tags:
Not sure yet what the workaround for this would be, without manually editing a bunch of old files to an as-of-yet unknown markup. |
Kyle's right @bvaughn Open to any suggestions/pull requests to improve! I only write posts in markdown if they're VERY simple otherwise, I'll do the whole thing in HTML so if you find more cases where markdown is having issues and could help fix, that would be awesome! Most of the crazy logic should be taken care of already. The code should be pretty easy to follow. I tried to write good comments. |
Cool. So just to confirm, it sounds like the fact that |
Yup! Just add a failing test and fix the bug! https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-remark-images/src/__tests__/index.js |
Also, I just realized, I haven't been using gatsby-remark-images any more and am using this version of gatsby-copy-linked-files. Can't get it to build on the gatsby site for whatever reason but it's working in all my codebases. So it's possible the fix for that problem is already fixed and you'll just be able to port it! |
Sorry, I was writing up my thoughts as I went along and didn't mean to actually submit them yet, let alone to close the issue. (Misclicked.) |
Hey, closing out old issues. Please re-open if you have additional questions, thanks! |
While working on the
gatsby
branch offacebook/react
I noticed an unexpected behavior with regard to how Gatsby handles different image types within markdown files.This may be caused by something upstream (haven't dug into it yet) but the docs made no mention of this limitation that I saw so I wanted to file it.
Another difference is that eg .gif and .jpg image types output regular HTML image tags, eg:
...becomes...
But .png images output "responsive" image anchor tags, eg:
...becomes...
The text was updated successfully, but these errors were encountered: