Skip to content

fix(photos): print usable URLs for saved image markup - #100

Open
rudycelekli wants to merge 1 commit into
Nutlope:mainfrom
rudycelekli:fix/saved-photo-html-urls-20261027
Open

rudycelekli wants to merge 1 commit into
Nutlope:mainfrom
rudycelekli:fix/saved-photo-html-urls-20261027

Conversation

@rudycelekli

Copy link
Copy Markdown
Contributor

Summary

Make the HTML printed by photos --save assets usable from a page served at the project root. The command downloads an image correctly but puts its absolute filesystem path in the ready-to-copy <img>, which becomes a missing URL when served over HTTP.

Convert only the printed HTML source to a working-directory-relative URL, encoding each path segment and normalizing separators. JSON retains its absolute filesystem path; failed downloads and unsaved remote images keep their existing fallback. The documentation states the static project-root scope; this does not infer framework public-folder mappings.

Validation

Actual CLI plus local HTTP proof, using a real public Wikimedia thumbnail: the original emitted image URL returns 404 while the actual asset returns 200. With this patch the emitted URL returns 200 and identical 135,385 image bytes. No model or paid service was used.

The same maintained process regression has three expected failures and three passes on unchanged main, then six passes with the fix. It controls only the download Response boundary for deterministic CI; real selection, CLI, file writes and HTML formatting run normally. Controls cover relative/absolute output directories, Unicode/space/hash URL segments, unchanged absolute JSON paths, failed-download fallback, and unsaved remote output.

Required local reference checks (101 files), all 50 theme validations, index regeneration without a diff and whitespace checks pass. The regression is added to the existing Node 20 verify workflow. Local runtime was Node 22; hosted checks are pending. Vercel deployment authorization is a separate team gate.

Checked all 68 historical/current PRs and full file lists for earlier broad photo/theme work, including #79 which introduced the current expression. Prepared with AI assistance under the account owner's direction and independently reviewed. Maintainer review and merge remain pending.

@vercel

vercel Bot commented Oct 27, 2026

Copy link
Copy Markdown

@rudycelekli is attempting to deploy a commit to the Together AI Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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