Jump to content

User:Archimerged/Help:Images and other uploaded files

From Meta, a Wikimedia project coordination wiki

Uploading

[edit]

Before uploading, please take the time to check these important points:

  • If you created the image yourself, you must license it under one of several acceptable licenses, or dedicate it to the public domain. These acts are generally irrevocable.
  • If you did not create the image yourself, you must know about copyright licenses and provide accurate licensing information or accurate reasons why the image is not under copyright. Please take the time to read up on the subject.
  • You must choose a new unique filename for your image, and make sure it is not already in use.
  • You must make sure the file format is appropriate.
  • You need to be aware that as with wiki pages, others may edit or delete your uploads if they think it serves the project, and you may be blocked from uploading if you abuse the system.

Choosing a file name

[edit]

Please be aware of the following:

  • If you accidently upload to an existing filename, the old file is replaced and all articles which include it will be immediately displaying your new (probably unrelated) image. You must obtain the old file by downloading it using the file history links at the bottom of the image description page, and re-upload the old version.
  • Very new login accounts are not permitted to overwrite images. This may lead new users to believe that they will always be prevented from accidently overwriting existing images, but this is not the case.
  • You should name your files descriptively to avoid confusion.
  • Filenames are generally case sensitive.
  • Certain automatic transformations are performed which can lead to unanticipated name collisions:
    • On most if not all sites, the first character of the filename is converted to upper case.
    • Blanks in the filename are converted to underscores.
  • To make sure your filename is unique:
    • You can see what filename will be used by previewing an edit of a text page which references the file, and looking at the generated URL. This will also let you discover if the name is already in use.
    • Another way to find that a filename is already in use is to click on http://meta.wikipedia.org/wiki/Image:A and replace the A in the address bar of the browser with the file name. Make sure the first character is upper case and blanks are replaced by underscores.
    • Or use the search feature in Special:Imagelist.
  • The filename extension (the last dot and the characters after it) must accurately describe the file format.
  • When uploading to a commons shared by many wikis, be aware that a reference such as [[Image:The image name]] will use a locally uploaded image named Image:The_image_name, if there is one, and will otherwise use the image from the commons.

When a media file is replaced by uploading a new one with the same name (e.g. an image in an article is replaced), this does not show up in the page history of the article, nor in the Related changes of the article, nor in the revision history of the image description page (unless the description section is also changed). However, it is recorded in the Image History section of the image description page, and it changes Meta:Upload log. Therefore, to watch changes in images in an article, it is not sufficient to watch the article itself and the image description pages ("watching" in the sense of putting on the list of "watched pages"), but one should watch the Upload log also.

Upload log is deprecated -- the files on Meta and Commons have not been updated in years.

Special:Imagelist provides the same information as the Upload log provided, but it uses the user's local time instead of the default time (set to Coordinated Universal Time for Wikimedia projects). In addition it gives the file sizes. Further it allows loading of portions and sorting by size in addition to sorting by date, and it has not only links to the image description pages, but also directly to the images.

Choosing a file format

[edit]

The preferred formats are JPEG for photographic images, PNG for drawings and other iconic images, and OGG for sounds. Use GIF only for animations. The extension must accurately specify the format.

Uploading the file

[edit]

In the menu on the left under "toolbox" you will have a link named "Upload file". On the following page on most browsers, you will see a "Browse..." button, which will bring up your operating system's standard file open dialog. Choosing a file will fill the name of that file into the text field next to the button. There is another text box where you may enter the filename the image should be stored under. The filename is case-sensitive, except that on most if not all sites the first letter will be converted to upper case. You must also choose a copyright license for the file or a reason why the file is not under copyright. On the English Wikipedia you may be able to claim "fair use," but many other sites do not allow this. Press the "Upload file" button to finish the upload. This may take some time if you have a slow internet connection.

Uploading non-image files

[edit]

By default, MediaWiki only allows you to upload certain types of files (extensions gif, jpg, jpeg, ogg and png). This is managed by this order in includes/DefaultSettings.php:

$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ogg' );


If you want to be able to upload other file types, for instance ZIP files you must add this line to LocalSettings.php:

$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'ogg', 'zip');

Caution: do not modify the line in DefaultSettings.php because it will break when updating

Also you may find php and apache limit the filesize of uploads too giving spurious messages on the upload page such as "The file you uploaded seems to be empty. This might be due to a typo in the file name. Please check whether you really want to upload this file." See Q: What affects the maximum file size which can be uploaded? on this page for details: http://meta.wikimedia.org/wiki/Uploading_files#Frequently_Asked_Questions. (It might be better to have this information conglomerated more centrally). This error can also be caused by a full /tmp directory.

Take in account there is a blacklist of file extensions in includes/DefaultSettings.php:

$wgFileBlacklist = array(
# HTML may contain cookie-stealing JavaScript and web bugs
'html', 'htm',
# PHP scripts may execute arbitrary code on the server
'php', 'phtml', 'php3', 'php4', 'phps',
# Other types that may be interpreted by some servers
'shtml', 'jhtml', 'pl', 'py',
# May contain harmful executables for Windows victims
'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' );