News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Google image rights metadata

Started by PatrickMarq, May 21, 2020, 11:45:20 AM

Previous topic - Next topic

PatrickMarq

As I'm working on a new website, I found this article:
Add image rights metadata
Google supports the IPTC metadata format to manage image copyright information.

So as I'm already using a script to modify the EXIF data, I would like to add these tags also.
IPTC fields creator, copyright notice that's no problem but credit line, and the Licence url I have no idea what to use.

Thx
Patrick

StarGeek

Quote from: PatrickMarq on May 21, 2020, 11:45:20 AM
As I'm working on a new website, I found this article:

Was there a link you forgot to add?

QuoteGoogle supports the IPTC metadata format to manage image copyright information.

Is this about Google Photos?  Because Google Photos doesn't show extensive metadata.

QuoteIPTC fields creator, copyright notice that's no problem but credit line, and the Licence url I have no idea what to use.

You can find the IPTC Core definitions here.  If you look at the Credit Line entry, it will tell you the name for the older IPTC IIM/Legacy under the IIM Specs and the XMP entry under XMP Specs.  In both cases, the tag name is Credit, so you could write either IPTC:Credit or XMP:Credit or both.

The url was a bit harder to track down.  It's part of a Licensor structured tag.  I couldn't find it in exiftool at first, until I saw that the IPTC page entry I linked said it was part of the "structured PLUS ... property".  It appears on the Exiftool PLUS tags page.  So the tag name to set that would be LicensorURL.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

PatrickMarq

Yes indeed, I forgot the link:
https://support.google.com/webmasters/answer/9150868?hl=en

It's something that's in beta.

Thank you for all the trouble refine it for me
Thx
Patrick

StarGeek

Ah, interesting.  I'll have to look into this to see how it works.  That's definitely showing more data than Google Photos.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

PatrickMarq

It took me some searching but I think I have all the fields:
Just need to test it.

-iptc:credit=xxx
-creator=Xxx
-xmp:copyright="All rights reserved
-xmp:copyrightstatus="protected" ';
-xmp-xmprights:marked="true" ';
-LicensorURL="https://www.
-xmp:WebStatement="https://www. -> to show in Lightroom
-xmp:UsageTerms="https://www.

Alan Clifford

I'm confused.  https://support.google.com/webmasters/answer/9150868?hl=en  talks about iptc metadata not xmp.

In particular, it specifies iptc creator but
exiftool  -iptc:creator='Alan H. Clifford'  iptctest_1.jpg
Warning: Sorry, iptc:Creator doesn't exist or isn't writable

StarGeek

I'm pretty sure that when it says IPTC, it means IPTC Core, of which XMP-dc:Creator is a part of (technically, part of the Dublin Core).  The Creator entry on the IPTC website shows both the XMP and IIM tags for this entry.

As the XMP tags gain greater use, I've seen more and more references to IPTC actually meaning IPTC Core.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Alan Clifford

Just realized that the IIM name for creator is by-line.

https://iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#creator

Alan Clifford

Quote from: PatrickMarq on May 22, 2020, 12:52:47 PM
-xmp:UsageTerms="https://www.

I have usage terms as a string, "For consideration only.  No reproduction without prior permission", rather than a URL.  I have no recollection of where I found this phrase.


PatrickMarq

You can check here if the image is correct tagged:

https://getpmd.iptc.org/getiptcpmd.html

StarGeek

Heh, from that page...
   A key element of this service is ExifTool, a software developed by Phil Harvey
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Quote from: StarGeek on May 23, 2020, 03:13:40 PM
Heh, from that page...
   A key element of this service is ExifTool, a software developed by Phil Harvey

:)
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Meta Monkey

Just summing up this thread to save others the leg work in future.

A good summary of Google Images and IPTC metadata.
Quick guide to IPTC Photo Metadata and Google Images
https://iptc.org/standards/photo-metadata/quick-guide-to-iptc-photo-metadata-and-google-images/

Use this tool to test your images for that metadata ( Check "Metadata relevant for photos shown as result by search engines" for Option A or Option B ).
Get IPTC Photo Metadata
https://getpmd.iptc.org/getiptcpmd.html

And last but not least, here are the corresponding fields for ExifTool, and a nice little bash script to populate these fields in your images (just replace the ALLCAPS values with your own).

ExifTool Google Image IPTC metadata Tags

Copyright Notice: -xmp-dc:rights
Creator: -xmp-dc:Creator
Credit Line: -xmp-photoshop:Credit
Web Statement of Rights: -xmp-xmprights:WebStatement
Licensor URL: -xmp:LicensorURL

Links to relevant Tag sections:
https://exiftool.org/TagNames/XMP.html#dc
https://exiftool.org/TagNames/XMP.html#photoshop
https://exiftool.org/TagNames/XMP.html#xmpRights
https://exiftool.org/TagNames/XMP.html#Licensor

Bash Script for populating fields

#!/bin/bash
# IPTC Metadata for Google Images
# Run ./exiftool-iptc-google.sh

# Target directory
local dir="/PATH/TO/FILES"

# Target filename
local filename="*.jpg *.png"

# Tags ( https://exiftool.org/TagNames/XMP.html ) - eval used to execute the multiline string as a shell command.
local tags="-xmp-dc:rights='Copyright © STATEMENT' \
-xmp-dc:Creator='CREATOR NAME' \
-xmp-photoshop:Credit='CREDITS' \
-xmp-xmprights:WebStatement='HTTPS://LICENSORURL.COM/WEBSTATEMENT' \
-xmp:LicensorURL='HTTPS://LICENSORURL.COM' \
"
read -p "Enter working directory: " -i "$dir" -e dir
cd $dir && \
printf "Done: Working directory set to $dir\n"

read -p "Enter filename/s: " -i "$filename" -e filename
# eval: eval [arg ...] Execute arguments as a shell command.
# Combine ARGs into a single string, use the result as input to the shell, and execute the resulting commands.
eval exiftool -overwrite_original \ $tags $filename


Final food for thought - it might be handy to highlight these "Google Image" fields with their own page or section on the site, I know I spent longer than I'd have liked to tracking them down...

Anyways, thanks to all for the handy pointers here, and as a first post, I must say thanks Phil for the BIGLY TREMENDOUS ExifTool!!! It's frekkin rad! 8)