User:RobbieIanMorrison/uploading images

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
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:


 * Wikilegal

Upload methods
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
In many respects, this method is the simplest if the material is your own work. If not, methodB 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:


 * commons:Special:UploadWizard

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

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:


 * commons:Category:Energy model
 * commons:Category:Energy database
 * commons:Category:Optimization

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:


 * commons:Commons:Preparing images for upload

B : Email me the image files and then email the Wikimedia Foundation with your legal release
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:


 * commons:Commons:OTRS

B.1 : You email the image files to me
In this part, you email me the image files along with the following necessary information for each file:

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
On receipt of the files:


 * 1) I upload the image files (as described here) and add a   template somewhere in the file description, best just before the description template
 * 2) the above code generates a completed  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 partB.3

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

B.3 : You register with the Wikimedia Foundation
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:


 * interactive release text generator

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:

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

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

For more information:


 * commons:Commons:Email templates/Consent — release the rights to an image file to which the sender owns the copyright
 * commons:Commons:OTRS — a ticket system primarily for recording licensing permissions

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

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:


 * commons:Commons:Choosing a license

Guidance

 * 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
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:


 * commons:Commons:File types — advice on image and media file types
 * commons:Commons:Preparing images for upload — some hints

Vector graphics diagrams

 * 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

 * 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

 * 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

 * 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

 * PNG files are the default format for screenshots from 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:


 * commons:Commons:Upload/screenshot — screenshots should be from open source software
 * commons:Commons:Screenshots — details regarding screenshots
 * WMF view — non-binding response from WMF on the copyright status of a screenshot that contains copyrighted images

Project logos

 * 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:


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

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

File naming conventions
Image file names should be:


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

For more information:


 * File names — file naming conventions

Wikipedia Commons categories
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 topic.

For more information:


 * commons:Commons:Categories — general considerations
 * commons:Category:Topics
 * commons:Commons:How to create new categories or subcategories

Photographs
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
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):

Metadata can be examined using the same utility:

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

Inkscape
The Inkscape vector graphics editor attracts some special considerations.

Good practice
Good practice includes:


 * a transparent background is usually fine unless you need a color other than white &mdash; 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
Regarding fonts, three strategies can be adopted:


 * 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, 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:


 * 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:


 * commons:Help:SVG
 * commons:Help:Text and Inkscape — background on the use of the Inkscape F8 text tool

Embed a Creative Commons license
Embed a Creative Commons license in your SVG file:


 * use Inkscape0.92 or better
 * from the menu: File Document Properties  License  select a suitable license

Testing
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):

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):

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.


 * Commons SVG Checker

The SVG file can also be validated at:


 * http://validator.w3.org/

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

Closure
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:


 * wikimedia:Help:SVG — advice on using the SVG format
 * SVG help — a list of SVG pitfalls
 * commons:User:Quibik/Cleaning up SVG files manually — hand editing surplus code

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


 * File:Rolling horizon.png — a self-drawn diagram
 * File:Renewables ninja photovoltaics and wind energy database screenshot showing simulated pv output.jpg — a screenshot of web-based software
 * File:Osemosys energy model results for fictitious atlantis.png — a machine-generated image