When you're using srcset like this:
<img src="example-src.jpg" srcset="example-1x.jpg 1x, example-2x.jpg 2x" />
Or using a picture tag like this:
<picture>
<source media="(min-width: 64em)" src="high-res.jpg">
<source media="(min-width: 37.5em)" src="med-res.jpg">
<source src="low-res.jpg">
<img src="fallback.jpg" />
</picture>
Is it possible to find out what URL the browser decided to use? Checking the src
attribute of the <img>
tag itself doesn't actually tell you which image was loaded.
(Sorry if this is a duplicate. I can't find the solution to this anywhere.)