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 was archived by the owner on Jan 6, 2025. It is now read-only.
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.