0% found this document useful (0 votes)
233 views1 page

Lorem Picsum

The document summarizes how to use the Lorem Picsum API to generate random stock images of different sizes, formats, and filters. Key points include: 1) URLs follow the format https://picsum.photos/width/height to get a random image of a specified width and height. 2) Specific images can be retrieved by ID or seed. Grayscale, blur, and other filters can be added with query parameters. 3) The /v2/list endpoint returns image metadata in lists that can be paginated. 4) Individual image metadata can be obtained from the /id/info endpoint.

Uploaded by

junior dornelas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
233 views1 page

Lorem Picsum

The document summarizes how to use the Lorem Picsum API to generate random stock images of different sizes, formats, and filters. Key points include: 1) URLs follow the format https://picsum.photos/width/height to get a random image of a specified width and height. 2) Specific images can be retrieved by ID or seed. Grayscale, blur, and other filters can be added with query parameters. 3) The /v2/list endpoint returns image metadata in lists that can be paginated. 4) Individual image metadata can be obtained from the /id/info endpoint.

Uploaded by

junior dornelas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Lorem Picsum

The Lorem Ipsum for photos.

Easy to use, stylish placeholders


Just add your desired image size (width & height) after our URL, and you'll get a
random image.

https://picsum.photos/200/300

To get a square image, just add the size.

https://picsum.photos/200

Specific Image
Get a speci c image by adding /id/{image} to the start of the url.

https://picsum.photos/id/237/200/300

You can nd a list of all the images here.

Static Random Image


Get the same random image every time based on a seed, by adding
/seed/{seed} to the start of the url.

https://picsum.photos/seed/picsum/200/300

Grayscale
Get a grayscale image by appending ?grayscale to the end of the url.

https://picsum.photos/200/300?grayscale

Blur
Get a blurred image by appending ?blur to the end of the url.

https://picsum.photos/200/300/?blur

You can adjust the amount of blur by providing a number between 1


and 10 .

https://picsum.photos/200/300/?blur=2

Advanced Usage
You may combine any of the options above.
For example, to get a speci c image that is grayscale and blurred.

https://picsum.photos/id/870/200/300?grayscale&blur=2

To request multiple images of the same size in your browser, add the
random query param to prevent the images from being cached:

<img src="https://picsum.photos/200/300?random=1">
<img src="https://picsum.photos/200/300?random=2">

If you need a le ending, you can add .jpg to the end of the url.

https://picsum.photos/200/300.jpg

To get an image in the WebP format, you can add .webp to the end of
the url.

https://picsum.photos/200/300.webp

List Images
[
{ Get a list of images by using the /v2/list endpoint.
"id": "0",
"author": "Alejandro Escamilla",
"width": 5616, https://picsum.photos/v2/list
"height": 3744,
"url": "https://unsplash.com/...",
"download_url": "https://picsum.photos/..."
} The API will return 30 items per page by default.
]
To request another page, use the ?page parameter.
To change the amount of items per page, use the ?limit parameter.

https://picsum.photos/v2/list?page=2&limit=100

The Link header includes pagination information about the


next/previous pages

Image Details
{
Get information about a speci c image by using the the /id/{id}/info "id": "0",
"author": "Alejandro Escamilla",
endpoint. "width": 5616,
"height": 3744,
"url": "https://unsplash.com/...",
https://picsum.photos/id/0/info
"download_url": "https://picsum.photos/..."
}

You can nd out the ID of an image by looking at the Picsum-ID


header, or the User Comment eld in the EXIF metadata.

Created by David Marby & Nijiko Yonskai

Source
Having trouble? Poke @DMarby on Twitter

Images from Unsplash

You might also like