Hi Sachin,
Your beautiful Light Gallery works only on one image extension at the time jpg, webp or whatever, but what is missing is the possibility to use multiple image extensions at the same time in the html and let the browser choose jpg or webp or else.
Regards,
David
Please consider this request, dev.
The plugin uses regular <img>
tags, so it might be very easy to just add a fallback <img>
tag so we can use webp. At the moment using webp images make the lightgallery un-usable on mobile devices for websites trying to switch to webp.
it could be used like :
data-src="first_source.jpg" data-src-fallback="second_source.jpg"
So when there is a fallback you could build a <img fallback>
tag.
This would be very very useful!
I agree, it's a missing feature.
I would like to use webp and jp2 for modern browsers, and jpg as fallback for IE and other relics.
Any news on that issue ?
Most browsers nowadays support WebP, even Safari started supporting it earlier this year. Limiting the needs for alternative file formats.
Though it would still be nice to support that for legacy browsers.
This issue has been automatically marked as stale because it has not had recent activity. If the issue is still valid for version 2.x, please re-open. Apologize for not responding on time. Thank you for your contributions.
HTML5 picture tag is now supported in lightGallery v2 - https://www.lightgalleryjs.com/demos/responsive/
Most helpful comment
Please consider this request, dev.
The plugin uses regular
<img>
tags, so it might be very easy to just add a fallback<img>
tag so we can use webp. At the moment using webp images make the lightgallery un-usable on mobile devices for websites trying to switch to webp.it could be used like :
data-src="first_source.jpg" data-src-fallback="second_source.jpg"
So when there is a fallback you could build a
<img fallback>
tag.