Skip to content

fix: via.placeholder.com shut down in 2024 (now connection-refused)#751

Open
kiluazen wants to merge 1 commit intovercel:mainfrom
kiluazen:fix/dead-placeholder-urls-2026-04-22-batch7
Open

fix: via.placeholder.com shut down in 2024 (now connection-refused)#751
kiluazen wants to merge 1 commit intovercel:mainfrom
kiluazen:fix/dead-placeholder-urls-2026-04-22-batch7

Conversation

@kiluazen
Copy link
Copy Markdown

test/image.test.tsx references via.placeholder.com/*. The service was shut down in 2024 and the DNS record no longer resolves.


Why this is needed

via.placeholder.com was shut down in 2024 and its DNS record no longer resolves — every request now hangs or returns a connection error. Any example that references it renders a broken-image icon (and any code that depends on a 200 from it silently breaks).

Verify in any shell:

curl -sI --max-time 3 https://via.placeholder.com/300x200 || echo "connection refused / DNS gone"

What this PR changes

Replaces every https://via.placeholder.com/ URL inside test/image.test.tsx (20 occurrences: JSX src fixtures + their paired expect(requests).toEqual([...]) assertions) with https://placehold.co/.

Replacement details

placehold.co accepts the identical /<W>x<H> and /<size> path shapes, and — crucially for this test file — placehold.co/150.svg still serves SVG (same as the old via.placeholder.com/150.svg did). Since every JSX src is paired with a corresponding expect(...).toEqual([URL]) assertion, a single replace-all keeps all pairs consistent. No runtime code touched, and no snapshot should change in meaning (satori rasterises whatever image the image loader returns; the mocked loader is asserted against URL equality, which stays consistent).

Background

I'm tracking dead image-placeholder endpoints (source.unsplash.com/*, via.placeholder.com/*, placekitten.com/*) across public repos as part of tteg, a tiny CLI/HTTP API I built so projects can drop in real Unsplash photos without registering an Unsplash app or managing API keys. tteg is not a dependency of this PR — the diff uses the dependency-free canonical replacement (placehold.co, which accepts the same path shape as via.placeholder.com). If you want topic-matched real photos as a follow-up, the no-key HTTP API is at https://tteg-api-53227342417.asia-south1.run.app/search?q=<query>&n=1 (CORS-on, no auth).

One extra artifact you may find handy: a public scanner at https://tteg.kushalsm.com/scan?url= that highlights dead-placeholder patterns in any landing page — useful for verifying the fix lands and for finding other places dead URLs slipped in. Source: https://github.com/kiluazen/tteg-landing/blob/main/scan.html.

@kiluazen kiluazen requested a review from shuding as a code owner April 22, 2026 13:04
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
satori-playground Ready Ready Preview, Comment, Open in v0 Apr 22, 2026 1:05pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant