Skip to content

Fix broken fallback image in ContentCardTemplate — source.unsplash.com/random is deprecated (503)#2277

Open
kiluazen wants to merge 1 commit into
nuxt:mainfrom
kiluazen:fix/unsplash-random-deprecated
Open

Fix broken fallback image in ContentCardTemplate — source.unsplash.com/random is deprecated (503)#2277
kiluazen wants to merge 1 commit into
nuxt:mainfrom
kiluazen:fix/unsplash-random-deprecated

Conversation

@kiluazen
Copy link
Copy Markdown

Fix for issue #2276.

source.unsplash.com/random was deprecated by Unsplash in mid-2024 and now returns 503 / times out. ContentCardTemplate.vue L79 used the endpoint as the image fallback, so any ContentCard rendered without an explicit props.image shipped a broken <img> on the live Nuxt site.

Change

One-line: swap the fallback URL to a specific, permanent images.unsplash.com photo pinned to 800×500 at q=80.

  • Photo ID: 1763568258327-034710107b93 (a laptop-with-code shot; fits the dev-oriented cards).
  • No CORS/auth changes needed; Unsplash CDN URLs in this form are stable long-term.
  • Reverts trivially if you'd rather use a local asset in public/ — happy to push a follow-up that commits a bundled JPG instead.

Reproduce the bug

curl -I https://source.unsplash.com/random

Returns 503, or HTTP/2 404 on redirect, depending on region. See https://help.unsplash.com/en/articles/8656599-unsplash-source-is-deprecated for the official deprecation notice.

Context

I ran a GitHub code search on 2026-04-21 — ~16,500 files across ~885 unique repos still reference this dead endpoint. Writeup (including this repo): https://github.com/kiluazen/tteg/blob/research-note-autark/RESEARCH.md

  • Kushal

source.unsplash.com/random was deprecated by Unsplash in mid-2024
and now returns 503, so any ContentCard that renders without a
`props.image` shipped a broken <img> on the public site.

Replace the fallback with a specific, permanent images.unsplash.com
photo URL pinned to 800x500 at q=80. Photo is a code/laptop shot
credit-free via Unsplash's CDN; drop-in replacement for the random
developer-ish image the original fallback was meant to serve.
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 21, 2026

👷 Deploy request for nuxt pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 0d6b620

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1e312a3f-cdc9-4c6b-9d65-430ea7a3e0f1

📥 Commits

Reviewing files that changed from the base of the PR and between 8be195a and 0d6b620.

📒 Files selected for processing (1)
  • components/molecules/cards/ContentCardTemplate.vue

📝 Walkthrough

Walkthrough

The ContentCardTemplate.vue component's imgUrl computed property fallback behavior was updated. When the props.image value is empty, the default image source changes from a generic random Unsplash URL to a specific Unsplash image URL with defined query parameters for width, height, fit, and quality settings. This is a single-line substitution affecting only the default image fallback logic.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing a broken fallback image by replacing a deprecated Unsplash endpoint with a stable one.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the issue, the fix, reproduction steps, and context.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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