From TheAlmightyGuru
Jump to: navigation, search


Images not loading

  • Open ./images/.htaccess.
  • If you have a line which reads "Options +FollowSymlinks", change it to "Options +SymLinksIfOwnerMatch".
  • Save and upload.

Force regeneration of thumbnails

Sometimes MediaWiki generates bad thumbnails due to bugs that have existed in the code over the years. For example, for many years, any SVG image uploaded with a wgSVGConverter of "ImagickExt" wouldn't preserve transparent backgrounds in the thumbnail. Once the problem is fixed, you can regenerate a thumbnail by re-uploading the same image, but this is a hassle when the problem affects many images. Luckily, MediaWiki has a global date time variable called wgThumbnailEpoch. Any thumbnail generated after the specified date time will be regenerated the next time the image is viewed by a user. So, if you set this variable to a date after today's date, all you have to do is simply view every affected image to force a thumbnail regeneration.

To set this up, do the following:

  1. Add to the bottom of your LocalSettings.php the following line which uses the future date time, 3000-01-01 01:01:01:
    $wgThumbnailEpoch = 30000101010101;
  2. In your Wiki, go to the page of the image with the bad thumbnail. This should regenerate the thumbnail.
  3. If you still see the bad thumbnail, your browser probably has the image cached locals, so have your browser force a reload (usually CTRL-F5).
  4. After you've regenerated all the bad thumbnails, remember to remove the line from your LocalSettings.php, otherwise your thumbnails will be regenerated with every page load!

To help you filter which images need to be regenerated, do the following:

  1. In your Wiki, click Special pages in the left sidebar.
  2. Under the "Media reports and uploads" section, click Media statistics.
  3. The sections labeled "Drawings (vector images)" and "Bitmap images" will have links to pages which show every image of a specific format.