URL migration guide
Replace a broken source.unsplash.com image
If an older project still points at source.unsplash.com, replace the URL directly with the keyless OKSLOP placeholder endpoint. No SDK or account is required.
- <img src="https://source.unsplash.com/1600x900/?workspace" alt="Workspace" />
+ <img src="https://okslop.com/img/random/full?query=workspace&seed=hero" alt="Workspace" />The replacement pattern
https://okslop.com/img/random/{size}?query={topic}&seed={stable-slot}| Old source URL | OKSLOP replacement |
|---|---|
| source.unsplash.com/800x600/?office | okslop.com/img/random?query=office&seed=card |
| source.unsplash.com/featured/1600x900/?forest | okslop.com/img/random/full?query=forest&seed=hero |
| source.unsplash.com/random/?portrait | okslop.com/img/random?query=portrait&orientation=portrait |
What changes
Use fixed size variants
Replace arbitrary dimensions with xs, thumb, preview, full, or original. The default is the 800px preview variant.
Add a seed for stable slots
A seed makes a hero, card, or avatar repeatable. Omit it when you want an uncached random choice.
Keep the topic
Move the old keyword into query. URL-encode spaces and use natural-language subjects when useful.
Review the image and license
OKSLOP images are AI-generated. Review the selected image and the license before publishing it in your context.
This guide only replaces image URLs
Migrating an API client or the archived unsplash-js package involves request and response changes beyond a one-line image source. Use the existing API migration guide for that workflow.