Import of images in DT seems to lose spotlight attributes

I have an image on my desktop that has some spotlight attributes like

kMDItemISOSpeed                        = 1600
kMDItemKeywords                        = (
    Kunst,
    Religion,
    "Geba\U0308ude",
    Kirche
)

Now I import this image into DT and again check its spotlight attributes with
mdls <path to image in DT.
Now the kMDItemKeywords are missing from the output (in fact, the output is about 20% of the original one), but the keywords are available in DT’s metadata. Which is A Good Thing. But why does the import remove nearly all the spotlight metadata from the image?

If it didn’t, it would be easy to script a comprehensive “convert image metadata into DT metadata” script. As it stands, it’s a tedious task, and there’s no way to get at all the metadata that would be available to spotlight.

Edit: When I make a duplicate of the original file in Finder, all the Spotlight attributes are retained. So, it seems to me that DT is removing these attributes on import – if so, why?

Probably both Spotlight & DEVONthink retrieve the keywords from the file.

Most likely because the file isn’t part of the Spotlight index anymore after importing as it’s located inside a package. These are not extended attributes and the Spotlight index isn’t used at all by DEVONthink.

1 Like

@cgrunenberg is obviously correct on this.

Spotlight does not index inside package files (and never has).

Also, the internal directory has the .noindex extension that would also cause Spotlight to not index the contents of that location. You can actually use this for any folder in the Finder and Spotlight will ignore it.

1 Like

Thanks for the explanation. I didn’t know about this “noindex” extension, thought it to be an internal DT thingy (like “this is not indexed content but imported one”).

Still wondering why Spotlight would ignore packages – to me, they look just like folders (at least in Terminal). But anyway, that’s how it is, so no luck with image metadata there.

You’re welcome.