Srcset not working
Hi! I'm trying to display webp images with fallback for older browsers, but I can't seem to get it to target my webp images on browsers that support them. It always falls back to my jpg images.
According to mdn, I don't need to provide a condition descriptor (eg: 1x, 450w, etc) as it will be assigned a default descriptor of 1x. I have no need for that anyway as I am only using 1 image that doesn't vary too much in size.
Here's the source code:
Thank you!
1 Reply
Solved:
Chrome version: Version 114.0.5735.198 (Official Build) (x86_64)
Turns out that my webp images were being displayed, just that in Chrome's inspector it highlights the img tag instead of my source tag. I only found out by switching my source image for something else.
Seems like other people were confused by this as well: https://stackoverflow.com/questions/53598308/webp-and-picturesource-will-not-work-for-me-on-chrome
Stack Overflow
Webp and
I'm facing a problem, I just can't seem to find out what the problem is, I have:
<picture>
<source type="image/webp" srcset="/images/meh_logo.webp">
<img src="/images/meh_lo...