plchldr

A simple placeholder service written in Rust. Answers queries to /:dimensions.<FORMAT> with an image with the given dimensions and the given type. It supports sizes up to 3500px and formats including jpg, png, webp, avif, and svg. You can specify dimensions in the format WIDTHxHEIGHT or use a single size to generate a square image.

You can also add custom text to the image by using the text query parameter in the format text=Your%20Custom%20Text.

Currently, deployed here: https://plchldr.factorial.io

Usage Examples

You can request images by specifying dimensions and format in the URL. Add custom text by including the text query parameter.

Square Images

To get a square image, simply use a single dimension:

jpg

/200.jpg

/200.jpg

png

/200.png

/200.png

webp

/200.webp

/200.webp

avif

/200.avif

/200.avif

svg

/200.svg

/200.svg

Rectangular Images

Specify both width and height to get an image with specific dimensions:

jpg

/400x80.jpg

/400x80.jpg

png

/400x80.png

/400x80.png

webp

/400x80.webp

/400x80.webp

avif

/400x80.avif

/400x80.avif

svg

/400x80.svg

/400x80.svg

Custom Text

You can add custom text to your images by appending the text query parameter. Make sure the parameter is properly url-encoded (%20 for spaces, etc).

/400x80.avif?text=Hello+world

/400x80.avif?text=Hello%20world

/400x80.svg?text=Hello+world

/400x80.svg?text=Hello%20world