Help: Script can't read photoshop:Credit metadata in InDesign 2025 v20.4
- June 17, 2025
- 2 replies
- 1117 views
Hi,
I'm having a specific issue with a caption generation script in InDesign 2025 v20.4. The script can read image descriptions but not credit lines.
My situation: Claude wrote me a "Better Captions" script that automatically generates captions from image metadata (credit lines and descriptions) — then styles and sizes them properly, saving lots of extra steps. It's suddenly not reading the credit tag. The images definitely contain the metadata - I can verify this by going to Object > Captions > Generate Static Caption which works perfectly and creates the caption I expect. I can also see using the Links panel > XMP File Info... > Raw Data that the <photoshop:Credit> tag. All my metadata is created in Bridge, which I also just updated today
What's working:
- Description extraction via ExtendScript (dc:description) - works fine
- UI caption generation (Object > Captions > Generate Static Caption) - sees both credit and description perfectly
What's broken:
- Credit extraction via ExtendScript (photoshop:Credit) - returns empty/null
- Various XMP access methods for credit field specifically
My XMP contains:
<photoshop:Credit>First Last / Organization</photoshop:Credit> <dc:description> <rdf:Alt> <rdf:li xml:lang="x-default">Long description text here...</rdf:li> </rdf:Alt> </dc:description>
What I've tried for credit extraction:
- xmp.getProperty(XMPConst.NS_PHOTOSHOP, "Credit")
- Regex parsing of linkXmpPacket looking for <photoshop:Credit>
- generateStaticCaption() method (fails entirely)
- Various other XMP access approaches
The weird thing is that the UI can see both fields perfectly, and my script can extract the description just fine - it's specifically the photoshop:Credit field that's not accessible via scripting anymore.
Has anyone else noticed this? Is there a new way to access the photoshop:Credit field in 2025 v20.4, or is this a regression? This worked fine in previous versions and is breaking my automated caption workflow.
Thanks for any help!
