Though you could probably do it EVEN MORE lazily if you wanted #justsaying #doesntreallymatter.
I mashed this in here from a Vue component where I had a little bit more going on with props etc. but the same end result. If I open up the devtools Network tab I can see the high resolution images loading in after the rest of the page. Big perf wins!
If you want a challenge, it wouldn't be too much of a stretch to extend this to achieve something like what Medium does with the blurred image fading to the highres image. I haven't done it but it would be more or less along the lines of adding another image element, a wrapping container, and some sexy CSS.
<!-- Let the page render an image with a low res version (read: tiny file size). -->