Help:Purge

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Purging is a way to force Commons to recreate a page from its database, rather than relying on a "cached" version of the page. Caching makes Commons display pages more quickly, but occasionally makes it show copies of pages which are not up to date.

Example of editing a URL to manually purge a page, by adding the text
?action=purge
  • Manual: Purging can be done manually, by adding the text ?action=purge at the end of the URL in the address bar of the browser, and then pressing Enter or clicking "Go" to tell the browser to go to that revised URL. Using this method, you will see a confirmation request.[1] If you have a url such as http://commons.wikimedia.org/w/index.php?title=Commons:Undeletion_requests, you have to append &action=purge. If there is already an ?action=… specified in the URL, replace it with the purge action.
  • Gadget: Purging can also be done with the assistance of gadgets which can be activated in your Preferences.
    • Page Purge adds a "Purge" option in the "More" drop-down tab at the top of the page. In the standard Commons skin ("Vector"), this tab appears in the drop-down menu next to the search bar, accessible by clicking the arrow icon (MediaWiki Vector skin action arrow.svg). In skins other than Vector, the tab is labelled simply "*".
    • ExtraTabs2 includes a "Purge" tab along with other useful links.
    • Thumbnail Purge adds a "Generate thumbnail" tab which regenerates the thumbnails of an image (for example, after uploading a new version of a file).

Advanced manual thumbnail purging

Sometimes thumbnail purging can be a problem, even with the use of the Thumbnail Purge gadget. Here are some further steps to try.

  • Try clearing your cache and hitting the refresh button. Be sure to hold "Ctrl" (IE) or "Shift" (Firefox) when you refresh (hard refresh). Sometimes there is a delay in generating a new thumbnail for a newer version of an image.
  • Right click on the thumbnail to get to its page, append ?action=purge to the URL, and press Enter or click "Go".
  • You can try to force a new thumbnail to be generated by using this trick:
  1. Visit http://commons.wikimedia.org/w/thumb.php?f=Per_Stig_M%C3%B8ller.jpg&w=450 (copy your image name from the URL bar - so non-latin characters are escaped - into the ?f= and change the w= value to the width of the thumbnail you want to regenerate) ... this is forcing a new thumbnail to be rendered. Do this for all the size thumbnails you want to be re-rendered. You can also add a p parameter for the page number of the file, if multipaged.
  2. Open the image page. In the URL, change "action=edit" to "action=purge". Now repeatedly do a hard refresh on this URL until the new thumbnail is generated.
  3. Please purge your browser’s cache. (You only need to do it once.)

Internet Explorer: press Ctrl+F5, Firefox: hold down Shift while clicking Reload (or press Ctrl+ Shift+R), Opera/Konqueror: press F5, Safari: hold down Shift+alt while clicking Reload, Chrome: hold down Shift while clicking Reload

An alternative solution is to append to the URL an arbitrary string to the thumbnail image (append a question mark, then some string: ?random). It should force the image scalers to regenerate the thumbnail.
You can also use the {{Regenerate thumbnail}} template to create the URL:
Type this To get this
{{Regenerate thumbnail|1=California wind resource map 50m 800.jpg|2=79}} https://commons.wikimedia.org/w/thumb.php?f=California+wind+resource+map+50m+800.jpg&w=79
If you are having persistent problems with a thumbnail updating, one workaround trick you can use is to use a thumbnail of an unusual size. Instead of allowing the default/user-specified size, request an unusual size like 199px or 201px. Because this size is not usually used, the software will have to create a brand new thumbnail, and thus will use the new updated image, instead of supplying the existing thumbnail based on an old version of the image.
The default thumb sizes, and thus the ones most likely to have problems, are (from Special:Preferences): 120, 150, 180, 200, 250, 300 + the thumbnail for the image page (if the image is larger than this space) -- you can figure out what size this image is by right-clicking on it and choosing save as... - it will save as something like 450px-Properimagename.jpg - so the prefix tells you).
When there is a foolproof method for updating thumbnails or forcing them to re-render, rest assured, we will let you know.
If nothing of the above helps, simple renaming of a file would also solve the problem with outdated thumbnails.

Bugs

There are some known issues preventing proper thumbnail display or generation.

See also

  • mediawikiwiki:Manual:Purge#Requests must be confirmed