-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fallback for format types. fm: 'avif' #3
Comments
We'll look into this. Out of curiosity have you tried adding webp as a second format in your next config file? images: {
formats: ['image/avif', 'image/webp'],
}, |
@petewins forgot to tag you ☝️ |
@dsbrianwebster Using the formats option in next config will not help in this case. I found this loader interesting mostly because solves an issue with the default next image when deployed in Netlify (performance), but not having the ability to fallback seems a no go. |
@petewins @pauloamgomes I think that the answer to this issue is somewhat multi-layered. Next.js Image component docs note that the There's also the issue that we're explicitly setting what the image is being converted to via the API: All that said, I think the issue is both that Contentful's API isn't smart enough, and you're explicitly telling them what to serve you. Some suggestions: If you're going the explicit route, I would suggest using the webp format as there's wider support for it than avif currently. In the (unlikely) event you're able to move to a different image provider, you could use one that's smart enough to serve you the correct image based on headers. I think Imgix works. Closing this issue barring any new ideas/PR considerations. |
Thanks for the explanation @devjmetivier |
When
fm: 'avif'
is set, browsers like Safari won't be able to display the image.Is there a way to fallback to original image format through the loader or is this a limitation of the Next's loader?
The text was updated successfully, but these errors were encountered: