Difference between revisions of "Thumbnailing"

From Freephile Wiki
Jump to navigation Jump to search
(more sizes in scaling display)
(correct path)
 
(One intermediate revision by the same user not shown)
Line 23: Line 23:
 
|}
 
|}
  
The logo file at <nowiki>https://freephile.org/wiki/File:Eqt.logo.png</nowiki> is 599 378 pixels and is stored at <br><nowiki>https://freephile.org/w/images/8/8c/Eqt.logo.png</nowiki>
+
The logo file at <nowiki>https://freephile.org/wiki/File:Eqt.logo.png</nowiki> is 599 378 pixels and is stored at <br><nowiki>https://freephile.org/w/images/8/8c/Eqt.logo.png</nowiki>
 
Meanwhile, the thumbnails are served from <br>
 
Meanwhile, the thumbnails are served from <br>
 
<nowiki>https://freephile.org/w/images/</nowiki>'''thumb'''<nowiki>/8/8c/Eqt.logo.png/</nowiki>'''120px'''<nowiki>-Eqt.logo.png</nowiki>
 
<nowiki>https://freephile.org/w/images/</nowiki>'''thumb'''<nowiki>/8/8c/Eqt.logo.png/</nowiki>'''120px'''<nowiki>-Eqt.logo.png</nowiki>
Line 34: Line 34:
 
! Wiki Text !! Result
 
! Wiki Text !! Result
 
|-
 
|-
| <nowiki>[[File:Eqt.logo.png|100px|link=]]</nowiki> || [[File:Eqt.logo.png|100px|link=]]
+
| <nowiki>[[File:Eqt.logo.png|1000px|link=]]</nowiki> || [[File:Eqt.logo.png|1000px|link=]]
 
|-
 
|-
 
| <nowiki>[[File:Eqt.logo.png|200px|link=]]</nowiki> || [[File:Eqt.logo.png|200px|link=]]
 
| <nowiki>[[File:Eqt.logo.png|200px|link=]]</nowiki> || [[File:Eqt.logo.png|200px|link=]]
Line 59: Line 59:
 
| <nowiki>[[File:QB_cube.svg|16px|link=]]</nowiki> || [[File:QB_cube.svg|16px|link=]]
 
| <nowiki>[[File:QB_cube.svg|16px|link=]]</nowiki> || [[File:QB_cube.svg|16px|link=]]
 
|}
 
|}
 +
 +
Note that svg upscaling doesn't seem to be working
 +
 
=== Old Versions ===
 
=== Old Versions ===
 
Because the wiki versions files, you can update any media file, and still have the "old" one accessible.  This works in much the same way as the thumbnailing too... except the word 'archive' is in the path.
 
Because the wiki versions files, you can update any media file, and still have the "old" one accessible.  This works in much the same way as the thumbnailing too... except the word 'archive' is in the path.
 
[[File:Business.card.backside.jpg|120px|current card]] compared to  
 
[[File:Business.card.backside.jpg|120px|current card]] compared to  
https://freephile.org/w/images/thumb/archive/5/5f/20160127044917%21Business.card.backside.jpg/120px-Business.card.backside.jpg
+
https://wiki.freephile.org/w/img_auth.php/thumb/archive/5/5f/20160127044917!Business.card.backside.jpg/120px-Business.card.backside.jpg
  
 
== Thumbnailing Errors ==
 
== Thumbnailing Errors ==

Latest revision as of 11:23, 21 August 2018

It's been said by many a carpenter: "The only nail you don't want to hit with a hammer is your Thumb nail". But that's not what we mean here by thumbnail. In Category:Graphics, a thumbnail image is a smaller version of the original (perhaps as small as your thumb nail) that gives you an idea of the content of the graphic, obviously with less detail. MediaWiki software creates automatic thumbnails of images that are uploaded into the system. Don't worry, it only creates the thumbnail on demand, so that it doesn't do more work than necessary.

Image Hacks[edit | edit source]

Assorted Sizes On Demand[edit | edit source]

Because you can specify any size for your thumbnail, you can use your wiki to produce various sizes of media for use in different ways (think newsletters, email campaigns, logo galleries, media kits). Granted, your designer is going to want to ensure the results are good enough for public use and distribution, but for many cases the results can be quite acceptable.

https://freephile.org/wiki/File:Eqt.logo.png Article Page
https://freephile.org/w/images/8/8c/Eqt.logo.png Hashed directory storage
https://freephile.org/w/images/thumb/8/8c/Eqt.logo.png/120px-Eqt.logo.png Thumb example
https://freephile.org/w/images/thumb/8/8c/Eqt.logo.png/128px-Eqt.logo.png Non-existant thumbnail that will be created if URL is accessed.
https://freephile.org/w/images/thumb/8/8c/Eqt.logo.png/ All thumbs

The logo file at https://freephile.org/wiki/File:Eqt.logo.png is 599 � 378 pixels and is stored at
https://freephile.org/w/images/8/8c/Eqt.logo.png Meanwhile, the thumbnails are served from
https://freephile.org/w/images/thumb/8/8c/Eqt.logo.png/120px-Eqt.logo.png

When you request an image with different dimensions, that file is saved in the 'thumb' directory of the image. Unless those images are deleted by an administrator, you can then use them as web-accessible sources in your other content. See https://freephile.org/w/images/thumb/8/8c/Eqt.logo.png/ for a list of current logo files in various sizes. The truth is, you don't even have to edit a wiki page to create the thumbnail on demand. Simply requesting the file will create it. E.g.
https://freephile.org/w/images/thumb/8/8c/Eqt.logo.png/128px-Eqt.logo.png

Wiki Text Result
[[File:Eqt.logo.png|1000px|link=]] Eqt.logo.png
[[File:Eqt.logo.png|200px|link=]] Eqt.logo.png
[[File:Eqt.logo.png|128px|link=]] Eqt.logo.png
[[File:Eqt.logo.png|64px|link=]] Eqt.logo.png
[[File:Eqt.logo.png|16px|link=]] Eqt.logo.png
Wiki Text Result
[[File:QB_cube.svg|1000px|link=]] QB cube.svg
[[File:QB_cube.svg|200px|link=]] QB cube.svg
[[File:QB_cube.svg|128px|link=]] QB cube.svg
[[File:QB_cube.svg|64px|link=]] QB cube.svg
[[File:QB_cube.svg|16px|link=]] QB cube.svg

Note that svg upscaling doesn't seem to be working

Old Versions[edit | edit source]

Because the wiki versions files, you can update any media file, and still have the "old" one accessible. This works in much the same way as the thumbnailing too... except the word 'archive' is in the path. current card compared to 120px-Business.card.backside.jpg

Thumbnailing Errors[edit | edit source]

If you get an error about "Error creating thumbnail: Unable to save thumbnail to destination", and you've checked that the "images" directory is writable by the web server, as well as any sub-directories, then you might be able to solve the problem by unsetting the $wgTmpDirectory setting in your LocalSettings.php file. I had $wgTmpDirectory = "{$wgUploadDirectory}/tmp"; in a v1_26 version of MediaWiki. Thumbnails were generated after I commented-out the setting (thus restoring the default from DefaultSettings.php -- which luckily worked for me).

Reference[edit | edit source]