Wikipedia Images

A few days ago a friend (x) of a friend (y) showed me and my friend (y) a small app he was developing, that had photos from flickr and picasa. We suggested adding photos from Wikipedia as well, but he (x) said that the photos were too big, and it was too much trouble resizing them.
Luckily for him I knew of Wikipedia’s “hidden” image resizing feature, and as it was useful to me and to someone else, I thought I’d share it here.

Let’s say you are looking to resize the following image of the Eiffel Tower: Then the url to the image itself is:

To get the url to a resized image, just add ‘thumb/’ after ‘commons/’ and then add ‘/[%d]px-[filename]‘ at the end, were %d is the new width. So for our image, the new url would be:

That’s it, simple and quick. Have fun adding Wikipedia to your content!

This entry was posted in Programming and tagged , , , . Bookmark the permalink.

3 Responses to Wikipedia Images

  1. Uriel Katz says:

    Nice hack!
    Were did you find this? in the wiki source code? :)

  2. Amit Zur says:

    Great one. I can contribute also that I found the same thing for gravatar, e.g.

    ?size=x where x is any number (i think up to ~530)