Replace external image URLs with local assets#23
Merged
Conversation
- Replace Wikimedia hotlink in wall-of-sound/_Origins.astro with local path /ai-generated/wall-of-sound/gold-star-studios.jpg (Wikimedia blocks hotlinking, causing the broken image on mobile). The image file still needs to be downloaded from Wikimedia Commons and placed at public/ai-generated/wall-of-sound/gold-star-studios.jpg. - Replace https://via.placeholder.com/400x200 in markup.astro with local /placeholder.svg (added to public/). - Add scripts/check-external-images.test.mjs: vitest test that scans all .astro source files for <img src="https?://..."> and fails if any are found, preventing this class of bug in future. https://claude.ai/code/session_01JQbTB41G3gCgvTUT3wqt8x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces external image URLs with locally hosted assets to improve performance, reliability, and reduce external dependencies.
Key Changes
check-external-images.test.mjs) that validates no.astrofiles use external HTTP(S) URLs in<img src>attributespublic/placeholder.svg) to replace the external placeholder servicesrc/pages/ai-generated/markup.astroto use the local placeholder SVG instead ofhttps://via.placeholder.com/400x200src/pages/ai-generated/wall-of-sound/_Origins.astroto use a local image (/ai-generated/wall-of-sound/gold-star-studios.jpg) instead of the Wikimedia Commons URLImplementation Details
<img>tags with external HTTP(S) URLs across multiline boundarieshttps://claude.ai/code/session_01JQbTB41G3gCgvTUT3wqt8x