Skip to content

C2paBuilder::add_ingredient does not add the ingredient's thumbnail #90

Closed

Description

@kostiantynperehuda

When adding a signed image as an ingredient with C2paBuilder::add_ingredient to the image manifest, the resulting manifest does not include ingredient's thumbnail. Here is what the output image produced by tests/builder.test.cpp::TEST(Builder, SignFile) looks like in the validator:

Image

I've also modified the test to explicitly include the thumbnail of the ingredient as a resource, as shown in the chore(doc): add example of thumbnail #89 pr, below is my version:

        string ingredient_json = c2pa::read_ingredient_file(signed_image_path, output_path.parent_path());
        auto ingredient_json_obj = nlohmann::json::parse(ingredient_json);
        std::string resource_id = ingredient_json_obj["thumbnail"]["identifier"];

        ingredient_json = "{\"title\":\"Test Ingredient\"}";
        builder.add_resource(resource_id, signed_image_path);
        builder.add_ingredient(ingredient_json, signed_image_path);

The result is the same: no thumbnail of the ingredient image is displayed.
Note that the ingredient image does in fact contain its own thumbnail, which can be displayed by the validator, but it gets lost as soon as this image becomes an ingredient of another image.
I also tried extracting ingredient's thumbnail data bytes directly from the ingredient image using the C2paReader api, and including these bytes as a resource, the issue still persisted.

Activity

  1. github-jira-sync-bot commented on Sep 11, 2025

    @github-jira-sync-bot

    ✅ Jira issue https://jira.corp.adobe.com/browse/CAI-9476 is successfully created for this GitHub issue.

  2. yogeshbdeshpande commented on Sep 17, 2025

    @yogeshbdeshpande

    Thank you @andyparsons for assigning the issue. Look forward to have a fix which would be very helpful to the community!

  3. kostiantynperehuda commented on Oct 30, 2025

    @kostiantynperehuda
    ContributorAuthor

    The issue is no longer reproducible on the latest version of the library. This can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions