Tags missing after exporting jpeg

Hello,
I have an issue where when exporting JPEG, the tags field for the exported file is empty.
However if I just change it to TIFF and export it, all the tags are present.
In export Options Tags and Hierarchical tags are checked.
Could someone please confirm if they are experiencing same issue?
Darktable 5.0.1

No issues here with png or jpg (didn’t test tiff)

Welcome!

It might happen that for some images your total metadata exceeds the 64kB payload limit in JPEGs. TIFFs and PNGs don’t have this limit.

2 Likes

Thank you, good to know.
Is there a easy way to copy tags to sidecar for jpeg?
I do not mind to store sidecars for jpegs, I will import those. Now do I need to copy tags for each image separately or this can be automated?

Maybe you can disable the inclusion of the editing history from exported JPGs (in case you hit the limit mentioned above). Also, double check that exporting of tags is enabled.

https://darktable-org.github.io/dtdocs/en/module-reference/utility-modules/shared/export/#metadata-preferences

1 Like

Unchecked all metadata in Export preferences.
Left enable only tags and hierarchical tags.
Added 1 single tag, exported as JPED - tag field is still empty.

From the release notes :

For AVIF, EXR, JPEG XL, and XCF formats, darktable will not include any metadata fields unless the user selects all of the checkboxes in the export module’s preference options.

Hey, I am trying to export plane JPEG, no XL an not any of the formats in the release notes.

Which “tag field” are you looking for? keywords can be stored in several places…

Any one of these:

image

Can you share a .jpg export for us to see what is in the metadata via exiv2?

Yes, sure. I will add the raw files xmp as well.
0022-36_02.dng.xmp (7.1 KB)
0022-36_01

I checked jpeg export with dt master 5.1.0+547~g5bda13df86 with any chosen picture having one hierarchical tag (five levels) an this metadata export preferences :

exiv2 correctly shows the tags of the exported jpeg file :

exiv2 -pa DSC24930.jpg
Iptc.Envelope.CharacterSet                   String      3  
Xmp.exif.DateTimeOriginal                    XmpText    23  2024:01:27 15:51:23.000
Xmp.xmp.Rating                               XmpText     1  2
Xmp.xmpMM.DerivedFrom                        XmpText    12  DSC24930.ARW
Xmp.dc.subject                               XmpBag      5  berlin, deutschland, hermsdorf, reinickendorf, tegeler fliess
Xmp.lr.hierarchicalSubject                   XmpBag      1  deutschland|berlin|reinickendorf|hermsdorf|tegeler fliess

So darktable definitely correctly writes the tag(s) at jpeg export (if the 64 KB limit is met). To check this with your sample we would also need the source file (raw ?).
Checking your exported jpeg with exiv2 shows : no tags !

Yes, that is the problem I am facing.
0022-36.dng (37.7 MB)
0022-36.dng.xmp (8.0 KB)
Uploading dng and xmp with all tags that I want to export.

Could reproduce with your dng with current master. See Tags are missing when exporting JPEG · Issue #18613 · darktable-org/darktable · GitHub

Thank you!
Ran some more tests and described the outcomes in the GitHub issue.

TLDR:
So the files that have issue were produced by Silverfast.
My assumption would be that these files contain some kind of metadata that pushes it outside of 64 kb limit for JPEGs.
More over, this metadata survives Adobe Camera RAW conversion as well as darktable export where ALL metadata check boxes (except tags) are unchecked in export module (as exported TIFF that contains tags, imported back to darktable and exported to JPEG contains no tags) .