Generate a placeholder image in any format.
Plug in the width, height, and format (JPEG, PNG, WebP, AVIF) into the URL path, and you're good to go. It's fast & always free.
Setting fixed dimensions:
You can generate a placeholder image of any size by passing the width and height as URL parameters. Just use one of the following formats:
https://picperf.io/placeholder/<width>/<height>
https://picperf.io/placeholder/<width>x<height>
For example, to generate a 400x345 image, either of these will work:
https://picperf.io/placeholder/400/345
https://picperf.io/placeholder/400x345
Using "auto" height or width:
If you only care about the width or height of the placeholder image, set one of them to "auto":
https://picperf.io/placeholder/auto/430
Leaving off the height altogether will also work.
<!-- 300px-wide, "auto" height -->
https://picperf.io/placeholder/430
Choose a format:
You can choose a specific image format by slapping an extension onto the end of the URL. Supported formats include jpg, png, webp, and avif:
https://picperf.io/placeholder/<width>/<height>.<format>
For example, to get a 400x325 placeholder as an AVIF image:
https://picperf.io/placeholder/400/325.avif
Possible Placeholder Images
The algorithm: a randomly selected image from a collection of animals whose names start with the letter "P". Here's that collection: