#How to use fallback format on Picture tags
14 messages · Page 1 of 1 (latest)
Is there an issue opened to follow up on this? I had a quick look but didn't find any
There's no issues yet, I was planning to tackle it on Monday morning though
in addition to the wrong type, the generated img tag also has a fallbackformat attribute that doesn't seem to be a valid attribute (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img>)
Just merged a PR that fixes this, sorry for the inconvenience.
Yay! Thank you. It generates images according to the fallbackFormat.
Something is strange though. It still outputs the original PNG file during the build, while it is not referenced anywhere in the srcset attributes
My input is a PNG file
Input files are always bundled at the moment in the final folder
It's a bit of a design constraint on how Vite bundles images, I'm still thinking of a solution
For now, I can just delete them automatically after a build
Let me know if there's an issue where I can follow progress on this