Alter imgSrc to use srcset rather than just switching image source #1176
Labels
help wanted
The team would appreciate a PR from the community to address this issue
P5
Low-priority issue that needs consideration
Milestone
Proposal
What is the summary of the proposal?
Upgrade imgSrc to make use of the browser's own srcset functionality rather than just switching images.
What is the proposal?
The imgSrc API has a beautiful clarity about it and is great for implementation. However it doesn't seem to tap into the browser's own
srcset
functionality it means that while it serves the right image for the right screen size, it doesn't take account of pixel density.This means that if an image if 400px across, imgSrc will load the same image whether it's displayed on a regular screen or a retina screen. If imgSrc instead generated
srcset
attributes, the browser would dynamically assess which the right image was given the current screen size.Is there anything else we should know?
The text was updated successfully, but these errors were encountered: