I want to publish my pictures with a CC-BY-NC license but I could not find a tutorial how store this information with my JPEG metadata.

Is there a best practice? Do services like Flickr, Google+ or Facebook read this information?

  • 3
    \$\begingroup\$ Creative Commons has guidance on the use of XMP metadata to store licensing information. (This isn't a complete answer because it doesn't address how online services use the information. It would also be nice to discuss how to enter the metadata in Lightroom or other tools.) wiki.creativecommons.org/XMP \$\endgroup\$
    – coneslayer
    Commented May 7, 2012 at 19:53
  • 1
    \$\begingroup\$ I have a proof-of-concept (but working) Python script for this... would it be OT ;-)? \$\endgroup\$
    – Rmano
    Commented Feb 21, 2014 at 23:19
  • \$\begingroup\$ @Rmano I love scripting, so do it! :-) \$\endgroup\$ Commented Feb 22, 2014 at 0:05

4 Answers 4


As @coneslayer notes, Creative Commons does indeed provide guidance for XMP information.

The main thing is to set xmpRights:UsageTerms to This work is licensed to the public under the Creative Commons Attribution-ShareAlike license http://creativecommons.org/licenses/by­sa/2.0/ verify at http://example.com/pdf­metadata.html

That "verify" link is optional and should be a web site explaining the licensing in more detail. If you have such a web page, you should also set xmpRights:WebStatement to that URL.

They also recommend duplicating xmpRights:UsageTerms into dc:rights, because some people might use that tag instead.

You also can and should set XMP properties using Creative Commons' own schema, which defines cc:license, cc:morePermissions (for possible other allowed uses), cc:attributionURL, and cc:attributionName.


Use exiftool to add exif metadata easily from console. It is easy to install, already present in popular Linux distros (e.g. Ubuntu)

$ exiftool -by-line="[your name]" -CopyrightNotice="© [your name] ; \
            Licence: Creative Commons cc-by-nc 3.0 United States \
            (http://creativecommons.org/licenses/by-nc/3.0/us/)" \
            -artist="[your name]" -Copyright="© [your name] ; \
            Licence: Creative Commons cc-by-nc 3.0 United States \
            (http://creativecommons.org/licenses/by-nc/3.0/us/)" \

If you are using Photoshop you can go to File > File Info - This will allow you to include copyright data in the JPEG Metadata.

I am not aware of how services like Flickr, Google or Facebook handle metadata so I cannot comment there.


I use this little script, which you can easily adapt. It need Python2.6 (does not work with Python3 because FWIK the pyexiv2 library has not a Python3 version). This come pre-installed with practically all linux distributions; you may need to add the package python-pyexiv2 in some of them. No idea on how to install on windows.

#! /usr/bin/python
# -*- coding: utf-8 -*-
import sys
import pyexiv2
fimage = sys.argv[1]
metadata = pyexiv2.ImageMetadata(fimage)
my_name = "Romano Giannetti"
my_email = "[email protected]"
copyr = "(c) " + my_name + " <" + my_email + ">" + ", All Rights Reserved" 
# set exif: 
metadata[exif_a]=pyexiv2.ExifTag(exif_a, my_name)
metadata[exif_r]=pyexiv2.ExifTag(exif_r, copyr)
# set XMP
metadata[key_auth]=pyexiv2.XmpTag(key_auth, (my_name, my_email))
metadata[key_rights]=pyexiv2.XmpTag(key_rights, copyr)

I think is more or less self-explicative: if you need to change/add Xmp tags, you simply do

metadata[keytag_name]=pyexiv2.XmpTag(keytag_name, "this is the tag content")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.