Lorem Picsum the image version of Lorem Ipsum thus providing free to use placeholder images in the style and size of your preference. Lorem Picsum uses images sourced from Unsplash, has no rate limits and uses Buluga CDN ensuring the images don’t slow you down.
The usage is super simple for Lorem Picsum: picsum.photos/300/300
will return a random image 300 high, 300 wide.
Alternatively you can use the photo id: https://picsum.photos/id/237/200/300
The photo id is 237 with a width of 200 and height is 300. You can find all the photos and their id here or by the API endpoint https://picsum.photos/v2/list?page=1&limit=100
.
The url above returns
whilst https://picsum.photos/id/237/400/300
will show
Removing /id/237 will fetch a random image.
You can add blur by adding ?blur=value on the end of the URL. The value can be in between 1 and 10.
Making the image grayscale is also possible, this is simply done by appending ?grayscale (&grayscale) onto the URL.
There is no shortage of free to use image placeholder services so there is nothing overly exciting with Lorem Picsum. It works, its fast and its free which is deserving of credit.