Added support for retina images using srcset in img tag.#348
Open
hennikul wants to merge 2 commits intoGalleriaJS:masterfrom
Open
Added support for retina images using srcset in img tag.#348hennikul wants to merge 2 commits intoGalleriaJS:masterfrom
hennikul wants to merge 2 commits intoGalleriaJS:masterfrom
Conversation
- Used by adding srcset string when pushing images to gallery.
Author
|
After closer inspections of the network traffic, it seems the preloading is still using the smaller image. This causes every image to be loaded twice. One for retina, and one normal. I haven't been able to figure out where to connect this to the preloading functionality. |
|
Does anyone currently have plans to continue working on this? |
There was a problem hiding this comment.
It should probably say "100vw", not "100wv"
|
Anybody? No? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Example:
Results in:
This will tell the browser that the image will be rendered at 921px width (initially), calculated by the Galleria scaler, and that there is a set of sources available. On my Nexus 9, it will choose the 2048w image.