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

Work with responsive images - picture tag and srcset #153

Open
AInteriorB opened this issue Oct 8, 2019 · 0 comments
Open

Work with responsive images - picture tag and srcset #153

AInteriorB opened this issue Oct 8, 2019 · 0 comments

Comments

@AInteriorB
Copy link

AInteriorB commented Oct 8, 2019

The lightbox itself is responsive, but you can provide only one image element, It would be great that the lightbox works with the modern picture tag and srcset where you can give different media types and sizes and the browser finds the needed resource itself. I think this was already mentioned in #71 but closed due to no response.

A responsive image-tag can look like this nowadays:

<picture>
    <source type="image/webp"
            srcset="img/image.webp 3000w,
                    img/image_2400.webp 2400w,
                    img/image_1600.webp 1600w"
            sizes="100vw" />
    <source 
            srcset="img/image.jpg 3000w,
                    img/image_2400.jpg 2400w,
                    img/image_1600.jpg 1600w"
            sizes="100vw" />
    <img src="img/image_2400.jpg" alt="Image" />
</picture>

Please see the following urls for more infomation:

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

No branches or pull requests

2 participants