Stop images from loading

If you were talking about displaying different versions of an image to different screens, then I would recommend the srcset attribute or picture element.

This is a slightly odd request, because you are only displaying on the smaller screen, where bandwidth may be more of an issue.

To not show any image, and not load the image on one screen size, you may need to make the image a background image in css, then use a media query to decide when the background is displayed. I think most browsers then won’t load the image. There were some tests done on this, I don’t recall the exact results.

3 Likes