Open VarPDev opened 10 months ago
Thanks for reporting the issue, I will look at it.
UPDATE: The plugin is replacing src attribute with srcset for the image. is it a valid attribute for gif images? 🤔
@gioboa I published a new version with a simple img tag with srcset="image.gif" and it works. You can check at this url https://deluciapasquale.it/test The problem I saw is that using the plugin the image was converted in a file with the format .webp
srcSet could be valid if you wanted to serve several sizes of .gif images. But the problem is that the plugin should detect that it's a multi-frame gif and then convert it to an animated webp image.
another problem is that the plugin outputs webp but that's only supported in safari since 2022, so older ipads and iphones will not see the images.
Ideally qwik-city (in non-SSG mode) generates image URLs without extension and it serves the images in the format that the browser supports.
See for example https://www.cap.be/_img/bigstock--129318500_k.jpg@mid, depending on your browser's Accepts header, you'll get AVIF, WebP or JPEG.
Which component is affected?
Qwik Rollup / Vite plugin
Describe the bug
I tried to follow the instruction in this warning, but if I use ESM to import an image that .gif extension, the animated image didn't work. So i have to use img tag and the warning still remain in the console.
Reproduction
https://pako.vercel.app/test/
Steps to reproduce
No response
System Info
Additional Information
No response