Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for image srcset #117

Closed
pvonseth opened this issue May 15, 2020 · 1 comment
Closed

Add support for image srcset #117

pvonseth opened this issue May 15, 2020 · 1 comment

Comments

@pvonseth
Copy link

Especially on mobile it would be a performance advantage if the Lightbox would supports the img srcset and thus reduces the loading time for the user.

@banthagroup
Copy link
Owner

Since 3.2.0 there are available custom attributes.
You can add srcset using data- prefix:
<a data-fslightbox="gallery" data-srcset="img/second.jpg 2x, img/third.jpg 3x" href="first.jpg"></a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants