How to serve a billion images a month on a budget

I wrote earlier this year about Lorem Picsum, a site that provides random placeholder images for use in design projects in the spirit of Lorem Ipsum, the classic jumbled-up latin passage used likewise for text. It's taken off. Creator David Marby explains what it's like to serve a billion images a month of a budget.

Processing images is very CPU intensive. As Lorem Picsum runs on a very small budget, to cope with all the requests as the service became more popular, we wanted to avoid doing so as much as possible. This meant adding caching to multiple layers of the architecture. We added two separate layers of caching: A CDN in front, as well as a second cache layer using Varnish Cache. To make the image processing as efficient as possible, we decided to use libvips, as it's very fast and resource-efficient.

As part of making Lorem Picsum as easy to use as possible, we've never required any registration, API keys, or enforced any usage limits. This has generally worked out well, but once in a while a high traffic site deploys production code calling our API, usually accidentally, which leads to [problems]

Read the rest

Lorem Ipsum but for images

David Marby & Nijiko Yonskai's Lorem Picsum is an online service that generates placeholder images. All you have to do is write image URLs like so — https://picsum.photos/400/300 — with the folder names defining the image dimensions.

Part of the utility of lorem ipsum, however, is that the text consists of real words and sentences, but jumbled up. This means it has the dimensions of real text, but no meaning to distract the typesetter or designer from its form. Latin having similar dimensions to English, lorem ipsum has only improved for this purpose with the decline of Latin.

It seems to me, then, that the garbled reality of deep-dream images is more appropriate than the meaningful stock photos used here. Perhaps I'm just encouraging the world to be more completely filled with nightmares? Some of these AI-mediated works are quite lovely. Read the rest