You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 22, 2020. It is now read-only.
I am showcasing images optimized for retina displays (@2x) which are 2400px width, forced to display at 1200px.
When I refernce those images inside lightbox, setting the "width" option to a size SMALLER than the image file has no effect. It only works for EXPANDING original image files, but larger files are not scaled down.
What I really would want is to have a 'max-width/max-height' option that will allow for the modal to be as small as needed and grow no further than XXX pixels, to keep image display to its best.
Thanks,
Rafa.
The text was updated successfully, but these errors were encountered:
Sounds like adding two new data-* attributes is the best thing to do, and then in the _resize method check that the attribute value is < maxHeight and width and use which ever is most appropriate.
Yeap, I have implemented that approach in a pull request (with added options in the example HTML file), and also improving a bit some padding / aspect ratio issues.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am showcasing images optimized for retina displays (@2x) which are 2400px width, forced to display at 1200px.
When I refernce those images inside lightbox, setting the "width" option to a size SMALLER than the image file has no effect. It only works for EXPANDING original image files, but larger files are not scaled down.
What I really would want is to have a 'max-width/max-height' option that will allow for the modal to be as small as needed and grow no further than XXX pixels, to keep image display to its best.
Thanks,
Rafa.
The text was updated successfully, but these errors were encountered: