I'm wondering if anyone can please help me determine why webp images are not rendered when viewing my gatsby site in the browser?
i'm using gatsby-plugin-mdx
and gatsby-remark-images
with option withWebp: true
With this setup, the resulting output source that is sent to the browser looks (roughly) like this...
<picture>
<source srcset-"/static/11aaa2b.../a12bc/example-image-1.webp ... etc... snipped
<source srcset-"/static/33ccc4d.../a12bc/example-image-1.jpg ... etc... snipped
<img src="/static/33ccc4d.../a12bc/example-image-1.jpg ... etc... snipped
</picture>
However, the browser is only rendering the <img>
version, i.e. the jpg.
I can see that the webp file is there.
I have also confirmed that the webp version is accessible (i.e. I can navigate specifically to the webp file...
Why isn't the browser rendering the webp version?
Thanks in advance for your time/thoughts on this to help me understand it.
I have searched for, but haven't yet found, an answer using the following:
- Checked here on StackOverflow using this search query.
- Looked for something in a few varieties of Google search, for example
- Re-checked the relevant usage doco, to ensure I was configuring things correctly