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

Feature/srcset thumbnail #8

Closed
wants to merge 3 commits into from
Closed

Feature/srcset thumbnail #8

wants to merge 3 commits into from

Conversation

drwlrsn
Copy link

@drwlrsn drwlrsn commented May 27, 2016

Wouldn't it be neat if the thumbnail images could also provide a srcset?

@neptunian
Copy link
Owner

neptunian commented May 30, 2016

Because the gallery has dynamic "fixed width" images that are calculated and recalculated according to the browser width, and also because the gallery uses media queries to change the container width, your solution would not work without using the 'sizes' attribute. For example if the image had a width="100" it would load the size relative to the width of the entire viewport instead of the smaller size needed. You can read further here:
https://ericportis.com/posts/2014/srcset-sizes/

I will research the issue a little further and implement an srcset and sizes option.

@neptunian neptunian closed this May 30, 2016
@drwlrsn
Copy link
Author

drwlrsn commented May 30, 2016

For sure. My implementation is fairly naive, but I did notice that Chrome was choosing the correct image to display.

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

Successfully merging this pull request may close these issues.

None yet

2 participants