Skip to content

Show ingredient thumbnails for provenance-free stub nodes#18

Open
andyparsons wants to merge 1 commit into
mainfrom
ingredient-thumbnails
Open

Show ingredient thumbnails for provenance-free stub nodes#18
andyparsons wants to merge 1 commit into
mainfrom
ingredient-thumbnails

Conversation

@andyparsons
Copy link
Copy Markdown
Collaborator

Summary

  • Ingredient assertions embed a thumbnail reference even when the ingredient has no Content Credentials. This PR resolves those thumbnails and displays them on dashed stub nodes in the provenance tree.
  • Handles both v2 (inline data) and v1 (JUMBF url pointing to a c2pa.thumbnail.* assertion in the parent manifest) thumbnail formats.
  • Extended enrichThumbnails and enrichThumbnailsViaPackagedSdk to also handle ingredient-embedded thumbnail identifiers (v2 case).

Test plan

  • Drop a file with one or more ingredients that have no Content Credentials but do have a thumbnail — confirm the thumbnail appears in the stub node card
  • Confirm stub nodes without thumbnails still show the placeholder icon
  • Confirm credentialed ingredient nodes are unaffected

🤖 Generated with Claude Code

… view

Ingredient assertions (c2pa.ingredient*) embed a thumbnail reference even
when the ingredient has no Content Credentials. This change resolves those
thumbnails and displays them on stub nodes in the provenance tree.

- ingredientThumbnailSrc(): handles both v2 (inline data) and v1 (JUMBF
  url pointing to a c2pa.thumbnail.* assertion in the parent manifest)
- enrichThumbnails(): extended to also resolve identifier URIs inside
  ingredient thumbnail objects (v2 embedded case)
- enrichThumbnailsViaPackagedSdk(): quick-check now also detects
  unresolved ingredient-embedded thumbnail identifiers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 13, 2026

Deploy Preview for c2pa-conformulator ready!

Name Link
🔨 Latest commit dccc450
🔍 Latest deploy log https://app.netlify.com/projects/c2pa-conformulator/deploys/6a049bc219e85f000867577e
😎 Deploy Preview https://deploy-preview-18--c2pa-conformulator.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sherifhanna-google sherifhanna-google self-requested a review May 14, 2026 00:02
Copy link
Copy Markdown
Collaborator

@sherifhanna-google sherifhanna-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works.

Copy link
Copy Markdown
Collaborator

@sherifhanna-google sherifhanna-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverting approval: some samples do not surface thumbnails as intended. Investigating.

@sherifhanna-google
Copy link
Copy Markdown
Collaborator

This PR still had an issue showing some thumbnails, e.g. from this image:
chatgpt5_postfix_test

Here's the thumbnail tree from PR18:

Screenshot 2026-05-15 at 4 58 46 PM

And here it is after some fixes in PR19:

Screenshot 2026-05-15 at 4 58 56 PM

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.

2 participants