An example of lazily loading images using fetch and the onload event attached to images. We gather images from reddit's API and display them using flexbox. Thumbnails are loaded first and then the full image.
Enter a subreddit or series of subreddits separated by spaces below. Arrow keys can be used after clicking an image.