Skip to content

exif: Added IPTC and XMP metadata to the EXIF object #13539

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LNA-DEV
Copy link

@LNA-DEV LNA-DEV commented Mar 29, 2025

Under the Exif Tags are now all tags from every metadata category with the priority Exif > IPTC > XMP but if someone wants a specific tag from a specific category this is still possible because of the "raw" lists of tags.

#13146

Under the Exif Tags are now all tags from every metadata category with the priority Exif > IPTC > XMP but if someone wants a specific tag from a specific category this is still possible because of the "raw" lists of tags.

\gohugoio#13146
Removed those checks because they are already made in the Decode function

gohugoio#13146
@shombando
Copy link

Just wanted to express interest in and support for this functionality. Image metadata between exif, iptc, xmp is a hot mess in the standards and how applications use them, and I really appreciate you tackling this thorny but useful issue. Thanks for your work!

Copy link

@OrangeDoro OrangeDoro left a comment

Choose a reason for hiding this comment

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

Hi! I'm a grad student working on a research project about using large language models to automate code review. Based on your commit 37e66e9 and the changes in resources/images/exif/exif.go, my tool generated this comment:

  1. Reintroduce the shouldExclude and shouldInclude checks to ensure that only the appropriate tags are processed.
    1. Add checks to ensure that tagInfos, tagInfos.XMP(), tagInfos.IPTC(), and tagInfos.EXIF() are not nil before attempting to range over them.
    1. Ensure that the tags map is declared and initialized properly elsewhere in the code to avoid compilation warnings or errors.
    1. Ensure that the type any is appropriate for your Go version. If using a version prior to Go 1.18, replace any with interface{}.
    1. Implement error handling or logging to capture any unexpected conditions or data issues during the processing of tags.
    1. Create a helper function to process tagsXmp, tagsIptc, and tagsExif to reduce redundancy.
    1. Add tests to verify that all tags are included in the output when the Decode function is called.
    1. Update or remove existing tests that relied on the previous inclusion/exclusion logic to reflect the new behavior.
    1. Document the removal of the shouldExclude and shouldInclude checks. If the intention is to include all tags regardless of these conditions, add a comment explaining this decision.
    1. Consider using a single map to reduce memory overhead if the same keys are being used across tagsXmp, tagsIptc, and tagsExif.

As part of my research, I'm trying to understand how useful these comments are in real-world development. If you have a moment, I'd be super grateful if you could quickly reply to these two yes/no questions:

  1. Does this comment provide suggestions from a dimension you hadn’t considered?

  2. Do you find this comment helpful?

Thanks a lot for your time and feedback! And sorry again if this message is a bother.

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.

4 participants