hugo-shortcode-gallery icon indicating copy to clipboard operation
hugo-shortcode-gallery copied to clipboard

Unable to use filterOptions on embedded exif data or color labels

Open eclecticpassions opened this issue 9 months ago • 2 comments

Hi Matze @mfg92, I'm having a lot of trouble getting the filterOptions to work with anything other than {label: '3 Stars', rating: '3'}.

It is not working for color labels eg: {label: 'Yellow', 'Color_Labels': 'yellow'} or filtering with the embedded exif data eg: {label: 'GR3x', Model: 'RICOH GR IIIx'}. Nothing happens when I click on these filter buttons, either it shows all the photos, or nothing.

I checked the photos with exiftool -a -G1 -s and it shows the color label metadata is under two namespaces: [XMP-digiKam] ColorLabel : yellow and [XMP-xmp] Label : yellow. For the camera model metadata it's in: [IFD0] Model : RICOH GR IIIx.

Secondly, I originally hoped it was possible to read tags/keywords directly from the [XMP-dc] Subject embedded metadata field but from what I understand it can only be done with the additional sidecar file within Hugo?

Thanks so much for creating this theme component for Hugo. If this works out it'll be a brilliant way of showing photos on the site. Thanks again.

Edit: My hugo.toml has this set for includeFields under [imaging.Exif] because ".*" was causing a lot of weird symbols being extracted from the metadata (seen when debugging with:

{{ with .Exif }}
<pre>{{ . | jsonify }}</pre>
{{ end }} 

After specifying includeFields instead of "all", the weird symbols and gibberish was gone.

[imaging]
  [imaging.exif]
    includeFields = "Copyright|Artist|Rights|Exif|Tags|Rating|FNumber|ISO|Lens|Model|Exposure|FocalLength|Title|Description"
    disableLatLong = true
    excludeFields = ''
    disableDate = false

Originally posted by @eclecticpassions in #63 I realised I commented on a closed thread, so I opened a new issue.

eclecticpassions avatar Jan 20 '25 05:01 eclecticpassions