Browser loads images from srcset and original image

For example, I have img

:

<img src="images/image-520.jpg"
     alt="some image"
     srcset="images/image-1040.jpg 2x"
>

      

In normal mode, not in mesh displays, the browser only loads image-520.jpg

, but on retina displays, both chrome desktop and safari for iOS on first load and render image-1040.jpg

and after the event DOMContentLoaded

, they load the original image image-520.jpg

, Can anyone explain why is this happening and how can I avoid it?

+3


source to share





All Articles