Skip to content

Keep curator alt text on product images when syncing - #7

Merged
mgilardi merged 1 commit into
mainfrom
co/printify-keep-alt
Nov 20, 2026
Merged

mgilardi merged 1 commit into
mainfrom
co/printify-keep-alt

Conversation

@mgilardi

Copy link
Copy Markdown
Collaborator

Captive Origins task: K number not given in the brief (curators lose alt text at each sync). Decision: D5001 (contribute by co/ branch PR).

Problem. Each sync set every product image's alt to the Printify title, so an alt a curator wrote in the Payload admin was lost at the next sync.

Change. An image's alt is filled with the product title only when it is empty, on first import and on later syncs. Images are matched by URL. Titles are imported exactly as before. No new field, no version bump.

Tested. Unit tests: new image gets the title, curator alt survives a resync (also when the title changes), emptied alt is refilled. The same flow on an in-memory MongoDB. Full suite (78 tests), typecheck and scripts/leak-check.sh pass. The repo has no lint script.

Not tested. A live Printify account. A store whose images rows differ from the plugin's own. If Printify changes an image's URL, that image gets the title again.

CHANGELOG entry is under Unreleased.

🤖 Generated with Claude Code

The sync set every product image's alt to the Printify title, so alt
text a curator wrote in Payload was lost at the next sync. Now an
image's alt is filled with the title only when it is empty, on first
import and on later syncs. Images are matched by URL. Title import is
unchanged.

Tested: unit tests (new image, curator alt kept, emptied alt refilled)
and the same flow against an in-memory MongoDB replica set.
Not tested: a live Printify account, or a store with a custom images
field.

Co-Authored-By: Michael Gilardi <11632652+mgilardi@users.noreply.github.com>
Co-Authored-By: Garfunkel Botsworth <357926774+garfunkelbot@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mgilardi
mgilardi merged commit aa56124 into main Nov 20, 2026
1 check passed
mgilardi added a commit that referenced this pull request Nov 20, 2026
Syncing keeps alt text written in Payload on product images (PR #7).
Not tested against a live Printify shop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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