Fix broken images in Lovable-generated pages

Lovable is one of the fastest ways to ship a landing page in 2026 — but the images tend to be placeholder URLs that break in production. Here's the fix.

What usually breaks

Lovable emits three common image patterns that don't hold up in production:

None of these are Lovable-specific. They appear across every AI code generator trained on 2023-2024 GitHub. But because Lovable's users are often non-engineers who ship one-shot without a manual image-polish pass, the breakage rate in Lovable-exported landing pages is higher than in hand-coded sites.

Audit your Lovable project in 5 seconds

https://tteg.kushalsm.com/scan?url=<your-lovable-preview-url>

Paste any Lovable preview or published URL. The scanner reports every placeholder / broken / random match with a one-line fix per pattern. No login.

Fix during editing: one Lovable prompt

When Lovable asks you to continue editing, paste:

Replace all placeholder and random-stock image URLs with real topic-matched
Unsplash photos from the tteg HTTP API. For each <img> element, infer the
subject from the surrounding text, then set the src to:

  https://tteg-api-53227342417.asia-south1.run.app/search?q=<topic>&n=1

(Use the image_url field from the JSON response.) Keep the alt text
descriptive of the actual subject, not the medium. CORS is enabled.
Do not use placehold.co, via.placeholder.com, source.unsplash.com/random,
or picsum.photos — these are placeholders or broken.

Fix after export: one CLI call per image

If you exported the Lovable project to your own repo:

uv tool install tteg
cd lovable-project

# for each placeholder image slot:
tteg save "mountain retreat" ./public/hero --orientation landscape
tteg save "developer workstation" ./public/feature-1
tteg save "team collaboration" ./public/feature-2

# or batch all slots from a JSON manifest:
tteg batch images.json
Why isn't this in Lovable by default? It's a training-data problem, not a Lovable bug. The AI behind Lovable (and v0, Bolt, Cursor, Claude Code, etc.) saw thousands of examples of source.unsplash.com/random and placehold.co in 2023-2024 GitHub and learned those as the canonical "image here" snippets. Fixing it at the model level will take another training cycle; fixing it in your project is one CLI call.

Related

tteg on GitHub →