A custom guide to uploading images to Wikimedia Commons · Robbie Morrison · 17 December 2018

This page provides guidance on uploading image files to Wikimedia Commons, either directly or by email.

It was written to assist those from whom I request images while developing Wikipedia articles. In particular, articles covering open source software and open data.

I must apologize in advance for the complexity of the process, but a number of issues related to copyright law, open formats, portability, and metadata should or must be complied with. Further difficulties arise when the person uploading the image is not the person who created the work. Note also that screenshots have special requirements.

Don't hesitate to contact me if you have questions or need assistance.

Background

edit

Wikimedia Commons is the place where the Wikimedia Foundation (WMF) stores images and other media files for use throughout the various language-specific Wikipedia projects.

The Wikimedia Foundation, like the GNU Project, is careful about copyright law. Indeed, paranoid might be a better description. Administrators usually patrol every upload and if the legal criteria are not meet to their satisfaction, the offending files are marked for deletion. Indeed the onus is on the person uploading images to demonstrate compliance with Wikimedia's legal requirements.

A comment in an email like "these images are freely accessible" does not constitute an open license.

For wide-ranging information on the law as it applies to Wikimedia Commons and to individual Wikipedia projects, refer to the Wikimedia Wikilegal site:

Upload methods

edit

You must be the copyright holder or be able to represent the copyright holder in order to provide images to Wikimedia Commons. The copyright holder is the person who created the work, unless that person has explicitly transferred the copyright to another party, in which case, the copyright holder may be an organization.

There are two methods we can use — other permutations exist but these are not covered here.

A : Upload the files yourself

edit

In many respects, this method is the simplest if the material is your own work. If not, method B may prove a better solution.

For this method you will need a Wikipedia account from one of the language-specific Wikipedia projects. The primary upload portal with a stepwise upload procedure is here:

You will be asked for the following information, some of which is optional and quite possibly irrelevant:

Table 1 : Image file metadata
  Field Comment
* local file name  name of the local image file to upload
* title / becomes the download file name best to use sentence case and space characters, see below for more guidance  
* description / becomes the default caption   with a translation into German or another language if you wish
* date defaults to the timestamp on the photograph, else the current date
* source of work own work for an original work
camera location defaults to embedded GPS data if present, else edit manually if relevant
other information displayed after the summary template
categories similar to tags or labels
  • Notes: an asterisk means the field is mandatory

Don't worry too much about categories. I will check and possibly add to these when the upload is complete. Notwithstanding, the following categories may be of interest:

Finally, you should inform me when you complete the process. I can then check and, if necessary, improve the metadata and also link to the image files in question.

For more information:

edit

The method is described on the assumption that you are representing the copyright holder. If you are indeed the copyright holder, then questions about your relationship with the copyright holder can naturally be omitted.

In this method, you finalize some associated information for each file and then email me the image files and that information. I then upload these files to Wikimedia Commons and tell you their new file names. You then generate a standardized release text for each file and email it to the Wikimedia Foundation (also Cc: to me if you would) for approval and storage. The process is roughly summarized here:

B.1 : You email the image files to me

edit

In this part, you email me the image files along with the following necessary information for each file:

Table 2 : Associated information for each file
No   Information
1 the name of the image file (implied by attachment)
2 a draft caption
3 the license you wish to use
4 the name of the person who created the work or the new copyright holder if the copyright has been explicitly transferred  
5 the relationship between yourself and the copyright holder (given they differ)

The copyright holder can be either a natural person or an organization. Your relationship with the copyright holder could therefore be:

  • as CEO or similar of the organization holding the copyright
  • as an appointed representative in the case of a natural person holding the copyright
  • as an appointed representative in the case of an organization holding the copyright

If the last situation applies, you should also state your position within the organization.

You then email me the image files plus the associated information. If the files are very large, say over 25 MB, then we will need to find another way to transfer them — perhaps using SCP to your institutional server or even Dropbox.

B.2 : I upload the image files

edit

On receipt of the files:

  1. I upload the image files (as described here) and add a {{subst:OP}} template somewhere in the file description, best just before the description template
  2. the above code generates a completed {{OTRS pending}} template and prevents the given file from being deleted during the approval process
  3. I email you the download names (entered as titles) that I chose for the uploaded files — you will need these new names during part B.3

As these image files are not my own work, I will be asked to:

Table 3 : Upload questions when not your own work
No   Issue Information
1 source identify the source — emailed by author or assigned representative of the copyright holder  
2 authors   name the person who created the work or the copyright holder if the copyright has been explicitly transferred  
3 license specify the license (as previously agreed)

B.3 : You register with the Wikimedia Foundation

edit

In this part, you use the OTRS (open-source ticket request system) interactive release text generator to create a custom email message which you then send to the Wikimedia Foundation for approval and storage. This confirms your status as the copyright holder or your authority to represent the copyright holder:

Each image file will require a separate declaration and email — multiple files cannot be included in the one email.

Please note in advance:

  • your email should come from an email address that the Wikimedia Foundation can recognize as associated with the content being released — for instance, if you are releasing images on behalf of an organization, then your email address should be an official email address of that organization
  • be aware that an OTRS volunteer from the Wikimedia Foundation may contact you to confirm your identity — and if you are also acting on behalf of the copyright holder, then you may be asked to provide proof of authorization, possibly by forwarding an email from the copyright holder describing this assignment

During the five step procedure, you should select the options indicated in blue:

Table 4 : Interactive release text generator
Step   Action
1 / 5 identify your authority in relation to the copyright — copyright resides with the person who created the work unless it has been explicitly transferred  
2 / 5
  • select: I or others have already uploaded the file to Wikimedia Commons
  • enter the name of the image file as stored on Wikimedia Commons
3 / 5 select: I want to release the media work — for diagrams, open source screenshots, and photographs of equipment and facilities
4 / 5 choose a license (the same one we agreed on) and consent
5 / 5
  • email the generated text to: permissions-commons wikimedia.org
  • either select: create release email to launch your email client (try first) or copy-paste the resulting text by hand (fallback)
  • can you also Cc: your email to me — optional but useful

Here is an example of the release text, generated after selecting a CC BY-SA 4.0 license:

Sample text
I hereby affirm that I represent SOMEOPEN Project, the creator and/or sole owner of the exclusive copyright of the media work https://commons.wikimedia.org/wiki/File:Eraseme.jpg.

I agree to publish the above-mentioned work under the Creative Commons Attribution ShareAlike 4.0 International.

I acknowledge that by doing so I grant anyone the right to use the work, even in a commercial product or otherwise, and to modify it according to their needs, provided that they abide by the terms of the license and any other applicable laws.

I am aware that this agreement is not limited to Wikipedia or related sites.

I am aware that the copyright holder always retains ownership of the copyright as well as the right to be attributed in accordance with the license chosen. Modifications others make to the work will not be claimed to have been made by the copyright holder.

I acknowledge that I cannot withdraw this agreement, and that the content may or may not be kept permanently on a Wikimedia project.

Fritz Mustermann
Assigned representative of SOMEOPEN Project
2017-03-08

[generated using relgen]

Following examination and approval by a Wikimedia Foundation volunteer, the image file page will display an OTRS number.

For more information:

Choice of license

edit

There are essentially three widely used Creative Commons public copyright licenses that you can select from:

  License Long title Type Comment
1 CC BY-SA 4.0 Creative Commons Attribute-ShareAlike 4.0 International copyleft or reciprocal attribution and sharing must be preserved in derivative works  
2 CC BY 4.0 Creative Commons Attribute 4.0 International permissive attribution must be preserved in derivative works
3 CC0 1.0 Creative Commons Zero 1.0 public domain no restrictions on usage

Please note:

  • the license version number must be stated
  • commercial use is not precluded by any of the given licenses
  • images released under a CC BY-SA 4.0 license cannot be used in documents and websites licensed under a CC BY 4.0 license — but the reverse transfer is acceptable
  • the previous point means that, for example, CC BY-SA 4.0 images cannot be used on the openmod wiki whereas CC BY 4.0 images can — in the event of using a copyleft license on Wikipedia, the copyright holder would be free to relicense the same images with a more permissive license for use elsewhere
  • these Creative Commons licenses are not suitable for source code, use a dedicated software license instead

For more information:

Guidance

edit
  • I generally prefer the copyleft variant myself but people less worried by "capture" should choose either a permissive license or a public domain license
  • that said, generated images (such as plots or screenshots) are probably best issued under a permissive license

Open image formats and types

edit

Wikimedia Commons will only accept open image formats. In addition:

  • Wikimedia has ample storage on its servers so images should be uploaded at their highest resolution
  • Wikimedia will automatically rescale the original files to create suitable thumbnails and web graphics

For more information:

Vector graphics diagrams

edit
  • SVG vector graphics files are preferred over raster graphics — that includes native Inkscape SVG files (.svg)
  • if working with Inkscape, see below for a list of hints and pitfalls

PDF diagrams

edit
  • ideally contact the artist and obtain a native format
  • otherwise PDF diagrams should be converted to Inkscape SVG using Inkscape
  • usually best to select "Poppler/Cairo import" over "Internal import" but try both and evaluate the resulting exports

Raster diagrams

edit
  • PNG files are usually best if your diagrams are only available as raster images (.png)
  • GIF files can also be uploaded but Wikimedia recommends that you export or convert them to PNG instead (.gif)

Photographs

edit
  • JPEG photographs are usually fine (.jpg) — if converted from RAW files, they should be saved at 85 quality
  • PNG photographs can also be submitted (.png) — unlike JPEG, PNG is a lossless format
  • proprietary RAW files (from Nikon, Canon, Sony, and so forth) cannot be uploaded

Screenshots

edit
  • PNG files are the default format for screenshots from PrtSc across most operating systems (.png)
  • screenshots should only be uploaded if the underlying software, whether a local application or web-based, is open source
  • visual elements arising from the use of a non-free operating system or non-free web browser should be cropped out
  • some very limited exceptions may apply to proprietary software screenshots under the legal doctrine of fair use

For more information:

Project logos

edit
  • any logo can be uploaded to an individual Wikipedia site and used without seeking permission from the copyright holder
  • this usage is based on the legal doctrine of fair use
  • logos should be in either SVG format or saved as low resolution raster graphics
  • logos cannot be uploaded to Wikimedia Commons for widespread use

For more information:

  • Wikipedia:Logos — a fair use policy applies and the images are uploaded to individual Wikipedia sites

Further considerations

edit

This section lists some additional considerations that may apply in some cases.

File naming conventions

edit

Image file names should be:

  • sentence case and use space characters between words (not hyphens and underscores)
  • descriptive and specific

For more information:

Wikipedia Commons categories

edit

It is important to categorize image files well. As noted earlier, I can assist with this exercise. A new entry might look like:

A category for images relating to [[wikipedia:Topic|topic]].

[[Category:Parent category name]]

For more information:

Photographs

edit

Photographs of equipment and facilities and of people may encounter the following restrictions:

  • Freedom of panorama — allows the photographing of public buildings, monuments, and public art in some countries (applies in Germany but not Sweden)
  • Personality rights — the right of an individual to control the commercial and other use of their name, image, likeness, or similar

A photograph of conference participants, for instance, may require that personal release forms be signed by those present before the image can be published.

Metadata

edit

The ExifTool utility can be used to transfer, edit, and add image metatdata, primarily in PNG and JPEG files. The utility is recommended if you wish to transfer metadata from a RAW photograph file to a PNG file converted using GIMP (assuming your RAW extension is indeed .raw):

$ exiftool -verbose -tagsFromFile image.raw image.png

Metadata can be examined using the same utility:

$ exiftool image.ext
$ exiftool -duplicates -groupHeadings image.ext    # more information

Exiftool can also be used to remove, add, and change metadata, but that usage lies outside the scope of this page.

Inkscape

edit

The Inkscape vector graphics editor attracts some special considerations.

Good practice

edit

Good practice includes:

  • a transparent background is usually fine unless you need a color other than white [a] — if you must force a white background or need a colored background for SVG rendering and/or PNG export, try either:
    • File → Document Properties → Background color → R: 255 G: 255 B: 255 A: 255 (white shown and make sure the alpha channel is set to 100%) (the page background is not a standard SVG feature, so browsers may not honor this)
    • add a rectangle to the background and fill it with color (the most browser friendly approach)
  • to create some space around your graphic, either:
    • set the page slightly bigger, say 2 mm (honored by Wikimedia and also browsers) (if exporting to PNG, ensure export area is page)
    • add a suitably sized rectangle to the lowest layer and make it invisible: Object → Fill and Stroke → set the Fill and Stroke paint tabs to No paint
  • but ensure that there is not too much white space around your graphic, this can be a problem if the original was laid out for printing or presentation
  • do not use flowed text, instead convert while retaining the line breaks: Text → Convert to Text
  • regarding text representation:
    • first, upload real text if it is supported on Wikimedia
    • second, upload vector text after converting via Path → Object to Path (and note "Text now vector (Path > Object to Path)")
  • delete linked bitmaps (Wikimedia will choke in any case) and possibly embedded bitmaps unless useful.
  • delete hidden layers unless they would remain useful
  • remove unused definitions: Text → Clean up document
  • always upload Inkscape SVG — there is no advantage in opting for Plain SVG

Fonts

edit

Regarding fonts, three strategies can be adopted:[b]

  1. select only fonts supported by Wikimedia, including Liberation Serif, Liberation Sans, Liberation Mono, and DejaVu Sans (wider than Liberation Sans)
  2. group the text, copy to another layer and convert to paths using Path → Object to Path or ⇧ Shift+Ctrl+C, then hide the prior layer
  3. simply transform all fonts using Path → Object to Path

I recommend the first option: using Wikimedia supported fonts. Followed by method two, if you must use specialist fonts. Option three makes it difficult to continue developing the diagram, particularly if the font names are not recorded.

A variant on method two is to add the fill-opacity="0" stroke-opacity="0" attributes to each remaining (genuine) text group. This hides the text but allows it to be later logged, searched, or selected and copied.

Fonts cannot (yet) be embedded natively in Inkscape, although there are some work-arounds that involve editing the SVG file directly.

To determine the supported Wikimedia fonts:

  • meta:SVG_fonts — an out-of-date but well formatted list of fonts on Wikimedia servers
  • fc-list — an up-to-date list of fonts on Wikimedia servers

To compare with the fonts installed on your Linux system, try (where DejaVu is a font family) (and where the awk version is better formatted, while the cut command prevents line wrapping for readability):

$ fc-list | grep "DejaVu Sans"
$ fc-list | awk 'BEGIN { FS=":" } { basename = sub(/.*\//, "", $1); printf("%-40s %-50s %s\n", $basename, $2, $3) }' | cut --characters=-$COLUMNS | sort | grep "DejaVu Sans"
$ fc-list | awk 'BEGIN { FS=":" } { basename = sub(/.*\//, "", $1); printf("%-40s %-50s %s\n", $basename, $2, $3) }' | sort | less --chop-long-lines [--pattern="DejaVu Sans"]

In passing, your can also determine how your system treats generic fonts:

$ fc-match "sans-serif"
DejaVuSansMono.ttf: "DejaVu Sans" "Book"

For more information on font issues:

Embed a Creative Commons license

edit

Embed a Creative Commons license in your SVG file:

  • use Inkscape 0.92 or better [c]
  • from the menu: File → Document Properties → License → select a suitable license

Testing

edit

Before uploading, view the SVG file in a contemporary web browser and/or suitable image viewer. From the bash command-line (firefox and eog are shown in the example):

$ firefox diagram.svg &
$ eog diagram.svg &
$ svgtest diagram.svg    # custom function

If using Linux, the SVG file can also be checked using the rsvg converter utility (the same software is run by Wikimedia Commons upon upload) and any PNG viewer (eog is used in this example):

$ rsvg-convert --format=png --output=temp.png diagram.svg
$ eog temp.png &

Finally, deploy this WMF web-interfaced SVG checker to test for SVG non-conformance and provide a preview of the likely SVG rasterization. Note that the librsvg version my lag behind that used on the Wikimedia Commons servers.

The SVG file can also be validated at:

The Wikipedia Commons templates {{ValidSVG}} and {{InvalidSVG}} can be included. In any case, WMF bots may automatically tag non-complying images.

Closure

edit

Note too:

  • do not simultaneously upload an equivalent PNG file — there is no need to do so and this can only lead to confusion

For more information:

Examples

edit

Some example images that relate to the principle theme of this page, namely the illustration of articles covering open source software and open data:

Notes

edit
  1. ^ See the Help:SVG FAQ.
  2. ^ Please note WMF bug T36947 on poor SVG rasterization.
  3. ^ Inkscape 0.91 has a bug whereby an unsupported license set in the document properties would not take. Later releases fixed this problem.



Quick links