Help:File redirect
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 pages
[edit]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:
- After renaming a file
- After merging two identical files (duplicates)
- 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 duplicates
[edit]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 paths
[edit]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, e.g. when pages are protected
- CommonsDelinker cannot change uses in old revisions of a page
- CommonsDelinker cannot change log entries (e.g. a user's upload log)
- CommonsDelinker does not change references that are not [[wiki-linked]].
Retention of external access paths
[edit]We have no way of knowing about all external uses (e.g. 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 purposes
[edit]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. e.g. 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 redirects
[edit]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 redirects
[edit]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 phab:T20017. In addition, Special:WhatLinksHere for File B on a local project will not show File A or its local uses (phab:T24471). 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 - phab:T16928).
- File redirects on Commons override local images on other projects (phab:T30299). (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 (phab:T29857) - No content (including templates and categories) is displayed on file redirect pages (phab:T29857)
- Cascade protection does not apply to the targets of file redirects, if the redirect is listed on the protected page (phab:T25542). 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 - phab:T37721.
See also
[edit]- Help:Redirect help about general redirect usage
- Commons:File renaming (policy)
- Commons:Deletion policy#Duplicates (policy)
- Discussions: Commons:Village pump/Archive/2009/10#What should we do with File redirects?, Commons:Administrators' noticeboard/Archive 18#File redirects