Help:File redirect

This image is File:Example.jpg, shown via the file redirect at [1] called File:File redirect example.jpg.

Most commonly file redirects are created when a file is renamed or exact duplicates are merged. These redirect pages normally contain no other meta-data about the file such as categories, description or templates.

How and why redirects are used on Commons for file pagesEdit

Redirects allow an individual file to be referred to by two (or more) distinct names. There are a number of instances where this is useful.

1) After renaming a file
2) After merging two identical files (duplicates)
3) To avoid having multiple copies of a file where we want to use different names for it in different contexts

Redirects after renaming files or merging duplicatesEdit

The objective of Commons is to make material freely available, file redirects attempt to maintain internal and external references to that content despite our internal housekeeping that might otherwise break existing access paths.

Retention of internal access pathsEdit

After renaming files or merging duplicates we attempt to replace all usage on the wikimedia projects with the new or remaining filename, using CommonsDelinker. But there may be many residual uses of, or references to, the old filename. Some of these uses we may be aware of, and others we have no technical way of finding nor correcting.

For Wikimedia projects the redirect facilitates finding the file by using the old/redundant name in cases that CommonsDelinker could not handle, for example:

  • CommonsDelinker cannot always replace usage, eg when pages are protected
  • CommonsDelinker cannot change uses in old revisions of a page
  • CommonsDelinker cannot change log entries (eg a user's upload log)
  • CommonsDelinker does not change references that are not [[wiki-linked]].

Retention of external access pathsEdit

We have no way of knowing about all external uses (eg references on the rest of the internet and printed publications). File redirection is only partially successful in maintaining access for content that we have moved or merged. It is successful in maintaining attribution paths that are required by many of our licenses, but does not repair 'hotlinks' from external sites that link directly to the original media file. Links to thumbnailed versions of files do get redirected.

Redirect for other purposesEdit

For example we occasionally have a set of files whose names have been "harmonised" to a regular naming pattern so that they can easily be used as icons in templates or some other context requiring automatic selection of the appropriate image. eg of the form File:Basename - en.JPG, File:Basename - de.JPG. There may be occasions where an image is used by two different naming schemes in two completely separate contexts - rather than duplicating the image by a different name, we can simply create a file redirect to the image. This is liable to be an infrequent requirement and the utility of this needs to be assessed on a case by case basis. In this context the redirect would most likely have categories added, possibly different ones from the destination file.

Unwanted use of file redirectsEdit

Creation of redirects in alternative languages is not wanted. Multi-lingual translations on the file's description page are used instead.

In-depth notes about the operation of file redirectsEdit

A file redirect from Commons File A to Commons File B will be listed at Special:WhatLinksHere for File B (local uses of the file, on Commons). However, any uses of File A outside Commons are not visible at Special:GlobalUsage for File B (global uses of the file, i.e. on other Wikimedia projects). See Bugzilla:18017. In addition, Special:WhatLinksHere for File B on a local project will not show File A or its local uses (Bugzilla:22471). Note: all uses of File A can be replaced globally using CommonsDelinker.

Technically, file redirects are ordinary redirects on File: pages, and they can be created manually. However, this only works where there is no file of that name (if there is a file, any uses of the redirect show the redirect's file, and not the target file - Bugzilla:14928).

  • File redirects on Commons override local images on other projects (Bugzilla28299). (Normally, local images take priority.) This means that moving a page on Commons which has the same name as a different local file will have an unexpected effect on the local project.
  • File redirects can be categorised by adding [[Category:..]] (and do show up in categories) - but the categories are not listed on the file redirect page (bugzilla:27857)
  • No content (including templates and categories) is displayed on file redirect pages (bugzilla:27857)
  • Cascade protection does not apply to the targets of file redirects, if the redirect is listed on the protected page (bugzilla:23542). But note that when protected pages are moved, the existing protection settings are applied both to the existing page under its new name, and to the redirect.
  • Moving files breaks hotlinks to the original file (direct uses of the file via upload.wikimedia.org, per COM:REUSE#Hotlinking). Hotlinking to the thumbnail version is not broken - Bugzilla:35721.

See alsoEdit

Last modified on 8 September 2013, at 14:24