xemle / home-gallery

Self-hosted open-source web gallery to view your photos and videos featuring mobile-friendly, tagging and AI powered image discovery
https://home-gallery.org
MIT License
805 stars 61 forks source link

Support for more metadata (IPTC name/caption) #141

Open GlaDOSik opened 3 months ago

GlaDOSik commented 3 months ago

Hello, I really like this project for how straightforward and easy to use it is. I wanted to ask if there is a support for some additional metadata like custom image regions, EXIF description or IPTC object name and caption. My primary goal is to add names/descriptions to some of my photos and I would like to have them saved in the photo metadata. From what I tried, these metadata fields aren't recognized. Is this something that is on your roadmap? If not, would you be willing to accept a PR with the support?

About custom image regions - I can live without them but since the Home Gallery already shows regions created by image recognition, I thought supporting regions from metadata would be a neat addition.

xemle commented 3 months ago

Hi @GlaDOSik

thank you for using HomeGallery, the flowers and reporting your issue.

You request

to add to HomeGallery. Basically this fits the feature set of the gallery. Currently I these fields not on my roadmap and I appreciate a PR for it. The feature can be copy paste from the tag feature - more or less.

I propose to start by reading the internals and the dev section of the documentation. Do not hesitate to ask any question.

As most software dealing with image meta data HomeGallery uses exiftool to read and write the meta data. While description and caption should be straight forward to provide a standard way to export them to a xmp sidecar file I am not familiar with object name or custom image regions.

Would you mind to provide information how object names and custom image regions are stored in xmp? E.g. link to a documentation or example xmp file?

GlaDOSik commented 3 months ago

I'm yet to study XMP/IPTC. I was trying desktop software Exif Pilot and Photini - that's where I found these attributes. Field "object name" seems to be a part of IPTC. But that's how Exif Pilot refers to the attribute. The official standard name could be different. Custom image regions - I don't know. You're able to define them in Photini but I don't know if they are a part of XMP or IPTC.

I think I will start with implementing the "description", which should be a part of EXIF. This will hopefully get me familiar with the project and then I could start figuring out the rest. At this moment, the description is most useful to me. Thank you for the quick reaction. Will use this ticket to track my progress.

xemle commented 2 months ago

Hi @GlaDOSik I just want to let you know that the newest master added an experimental plugin feature. With it you could easly update the database structure.

See docs.home-gallery.org/plugin for more details