Support gifs in gatsby-image #29410
Replies: 4 comments
-
The issue if the feature image is a gif, the feature image don't have pubicURL(workaround option) and childImageSharp is null. The feature image only have Source URL which is not local. Can any know how to fix this? |
Beta Was this translation helpful? Give feedback.
-
Gatsby Image is focused on performance. GIFs are not at all performant. They also don't support alpha transparency. If moving pictures are to be added to Gatsby image (which would make for an interesting API no doubt) please consider using performant BGP images which about 98% smaller than GIFs and support alpha transparency. (Note: Browser support for BPG is lacking but Fabrice created a WASM-based codec to load them). |
Beta Was this translation helpful? Give feedback.
-
Thinking very briefly about this -- I think what we'd want to do is: Enable querying by a GIF, however this would be wrapped by a performant / optimized The specifics would be the interesting piece (e.g. what tools do we use, what is the API, etc.) but I think this could be a fairly interesting use case, particularly if similar functionality is implemented and available in the Remark / MDX space. |
Beta Was this translation helpful? Give feedback.
-
Hi there, some time ago I wrote a plugin & transformer for gifs, though never found the time to make it a fully functional package (README, etc.). Best, Tim. |
Beta Was this translation helpful? Give feedback.
-
People often complain that gatsby-image doesn't support gifs — and end up doing weird work arounds to make it work:
We could just directly support gifs in gatsby-image like @wesbos' component — that + better support for querying images in graphiql would alleviate a lot of complaints about querying images .
Beta Was this translation helpful? Give feedback.
All reactions