BYTETOOLS

LoremFlickr API

Free placeholder photo service with no key: put dimensions and a keyword in the URL and get a matching real photograph from Flickr. Tested example included.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the LoremFlickr API?

LoremFlickr returns real photographs from Flickr sized to your dimensions and matched to a keyword you put in the URL path, with no API key. The response is the image itself after a redirect to a cached, pre-resized copy.

Generic placeholder services give you an arbitrary picture; this one gives you a picture of the thing you asked for. Appending `/dog` to the dimensions returns a photograph of a dog, which matters when you are reviewing a layout where the imagery is supposed to mean something — a product grid full of unrelated stock photos reads very differently from one full of plausible content.

Multiple keywords can be combined with commas, and prefixing the path with `/g/` gives greyscale as in the sibling services. The request 302-redirects to a cached, already-resized file, so your client must follow redirects and the final URL will not look like the one you requested. The important caveat is legal rather than technical: these are real Flickr photographs under their own individual licences, so they are for prototyping. Shipping one to production without checking its licence is a genuine risk, not a theoretical one.

Quick facts

Base URL
https://loremflickr.com
Authentication
No API key and no account. Individual photographs remain under their own Flickr licences.
Rate limit
No published limit. Resized images are cached, so repeat requests are cheap.
Pricing
Free to use. The underlying photographs are licensed individually by their creators.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the LoremFlickr API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Fetch a 320x240 photo matching a keyword

GET https://loremflickr.com/320/240/dog

curl
curl 'https://loremflickr.com/320/240/dog'
JavaScript (fetch)
const res = await fetch("https://loremflickr.com/320/240/dog");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://loremflickr.com/320/240/dog", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
# This endpoint returns image/jpeg, not JSON.
# The response body is the image itself, so it can be used directly as an
# <img src="..."> or saved to a file — there is nothing to parse.
#
# Verified: HTTP 200, Content-Type: image/jpeg

Parameters

ParameterTypeRequiredDescription
widthpathRequiredRequested width in pixels. 320
heightpathRequiredRequested height in pixels. 240
keywordpathOptionalSubject to match. Several can be combined with commas. dog
/g/pathOptionalPrefix segment returning the greyscale version.
lockqueryOptionalPin a specific image so repeat requests return the same photograph. 1

Response fields

(body)image/jpeg
The photograph itself. Use the URL directly as an `img` src.
(redirect)302
The request redirects to a cached, pre-resized file under `/cache/resized/`. Follow redirects or the request appears to fail.
Content-Typeheader
`image/jpeg`. Unlike some placeholder services this one does send a permissive CORS header, so canvas access works.

What you can build with the LoremFlickr API

  • Fill a prototype with imagery that matches the intended subject
  • Demonstrate a product grid or article list with plausible photos
  • Test how a layout handles varied real-world photography
  • Pin a specific image with lock for repeatable screenshots

Common errors and how to fix them

Request appears to fail

The endpoint 302-redirects to the cached file.

Fix: Enable redirect following. The final URL under `/cache/resized/` is the actual image.

Photo does not match the keyword

Matching is by Flickr tag, which is user-supplied and loose.

Fix: Use a common, concrete noun. Abstract keywords match poorly.

Different image every time

Selection is random within the keyword.

Fix: Add the `lock` parameter to pin a specific photograph for repeatable output.

Licence problem in production

These are real Flickr photographs under individual licences.

Fix: Prototype only. Check each photograph's licence on Flickr before any published use.

LoremFlickr API — frequently asked questions

Is LoremFlickr free?

The service is free with no key. The photographs themselves are real Flickr images under their creators' individual licences, which is a separate question from access.

How do I get a photo of a specific subject?

Append the keyword to the dimensions in the path, as in `/320/240/dog`. Several keywords can be combined with commas.

Can I get the same image every time?

Yes, with the `lock` parameter, which pins a specific photograph. That makes it usable for screenshots and visual regression tests.

Can I use these images in production?

Not safely without checking. Each photograph carries its own Flickr licence, some of which prohibit commercial use. Treat the service as a prototyping tool.

Tools that pair with this API

LoremFlickr is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.