How to Get Real Stock Photos in Claude Code Projects
April 2026You tell Claude Code to build a landing page. It writes clean HTML, picks good fonts, nails the layout. Then you open it in the browser and every image is a gray rectangle from via.placeholder.com or a broken Unsplash URL.
This happens because Claude Code can write code but can't search stock photo libraries. It doesn't have an Unsplash API key. So it does what it can: placeholder URLs.
The fix takes two minutes.
Option 1: MCP server (automatic)
Add this to your .claude/settings.json or codeSettings.json:
{
"mcpServers": {
"tteg": {
"command": "uvx",
"args": ["tteg-mcp"]
}
}
}
Now Claude Code can call search_and_save_image directly. When it builds a landing page, it searches Unsplash and saves real photos into your project. No API key. No registration.
Tell Claude: "Use tteg to find real photos for the hero, team, and testimonial sections."
Option 2: CLAUDE.md instruction
Add this block to your project's CLAUDE.md:
# Images When the project needs stock photos, use tteg: tteg save "search query" ./path/to/save No API key needed. Installs with: uv tool install tteg
Claude Code reads CLAUDE.md at the start of every session. It'll use tteg instead of inserting placeholder URLs.
Option 3: Batch fill after the build
Already have a site full of placeholders? Create a manifest:
{
"images": [
{"query": "startup office", "path": "./public/hero.jpg", "orientation": "landscape"},
{"query": "team collaboration", "path": "./public/team.jpg"},
{"query": "coffee shop interior", "path": "./public/about.jpg"},
{"query": "professional headshot", "path": "./public/founder.jpg"}
]
}
tteg batch manifest.json
One command. Every placeholder replaced with a real Unsplash photo.
Before and after
Without tteg
via.placeholder.com/800x400
placehold.co/600x300
source.unsplash.com/random (dead)
Gray boxes. Broken URLs.
With tteg
./public/hero.jpg (1920x1080)
./public/team.jpg (real photo)
./public/about.jpg (real photo)
Real photos. In your repo.
Works with Cursor too
Same MCP config, same CLI. If your AI coding tool supports MCP servers, it supports tteg. Tested with Claude Code, Cursor, and Windsurf.
The alternative: Unsplash MCP servers that need API keys
There are several Unsplash MCP servers on GitHub. All of them require you to:
- Create an Unsplash developer account
- Register an application
- Copy your API key into environment variables
- Configure each key in your MCP settings
tteg handles all of this on the backend. You point it at a query, it gives you a photo. Zero setup.