Test image URLs

Sample image URLs for testing

Every link below returns a real image with a fixed size and format, so you can paste it into tests, mocks, seed data or an API client and get a predictable result every time.

Open the generator
Green 800 x 450 sample image with the label Sample image
800 x 450 example from DummyImg

Copy a sample image URL

JPG, 800 x 450

https://www.dummyimg.in/placeholder?width=800&height=450&format=JPEG&text=Sample%20image

PNG, 600 x 400

https://www.dummyimg.in/placeholder?width=600&height=400

WEBP, 1280 x 720

https://www.dummyimg.in/placeholder?width=1280&height=720&format=WEBP

GIF, 320 x 240

https://www.dummyimg.in/placeholder?width=320&height=240&format=GIF

Square, 512 x 512

https://www.dummyimg.in/placeholder?width=512&height=512

Portrait, 400 x 600

https://www.dummyimg.in/placeholder?width=400&height=600

Large, 3000 x 2000

https://www.dummyimg.in/placeholder?width=3000&height=2000&format=JPEG

Custom label

https://www.dummyimg.in/placeholder?width=640&height=360&text=Test%20image&bg_color=%23f59e0b&text_color=%23111827

Why use generated sample images in tests

Hot-linking random photos from the web makes tests flaky: the file moves, the size changes, or the host blocks you. A generated sample image URL describes the image in the link itself, so the same URL always returns the same width, height and format.

That makes it easy to assert on image dimensions, test upload and resize code, fill product or user fixtures, and check how a layout behaves with a missing or slow image.

JavaScript (fetch)
const res = await fetch("https://www.dummyimg.in/placeholder?width=800&height=450&format=JPEG");
const blob = await res.blob();
console.log(res.headers.get("content-type"), blob.size); // image/jpeg
Python (requests + Pillow)
import io, requests
from PIL import Image

img = Image.open(io.BytesIO(requests.get("https://www.dummyimg.in/placeholder?width=640&height=360").content))
assert img.size == (640, 360)
JSON fixture
{
  "id": 42,
  "name": "Test product",
  "image": "https://www.dummyimg.in/placeholder?width=600&height=600&text=Product"
}

Questions

Are these sample image URLs stable?

Yes. The image is generated from the parameters in the URL, so the same URL always returns an image with the same size, format and text.

Which formats can I test with?

PNG, JPG/JPEG, WEBP, GIF and BMP. Add format=JPEG, format=WEBP and so on to the URL.

Is there a rate limit or API key?

No API key is needed and the URLs are free to use in tests and demos. Please cache images in heavy load tests instead of requesting thousands per second.

Can I get a sample image as a file download?

Yes. Swap /placeholder for /download in any URL, for example /download?width=800&height=450&format=JPEG.

More dummy image guides