Simple Thumbs

Create image thumbs from WP attachments, w/ option to crop & fit to wanted size &
create IMG-tags w/ correct width & height attributes.

Author:Pär Thernström (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:3.0.5
Plugin version:0.4.1
Added to WordPress repository:25-10-2010
Last updated:12-07-2011
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:0
Rated by:0
Plugin URI:http://eskapism.se/code-playground/simple-thu...
Total downloads:4 426
Active installs:10+
plugin download
Click to start download

** This plugin will no longer be updated. **

This plugin does three things:

  1. It creates rewrite rules that let you create nice urls for your images,
    like “http://example.com/image/55/DSC_0001.jpg” instead of “http://example.com/wordpress/wp-content/uploads/2010/02/DSC_0001.jpg””
  2. It let’s you resize and crop images. And you can add unsharp filter to them too.
  3. It adds a function, simple_thumbs_img() and with this function you can create ready-to-go IMG-tags
    that outputs the correct width and height, even if you choose to resize or crop your image.

Rewrite Rules/Nice Image URLs example

Instead of this URL:
http://example.com/wordpress/wp-content/uploads/2010/02/DSC_0001.jpg

Your image can have this URL, where 55 is the Attachment ID:
http://example.com/image/55/DSC_0001.jpg

Shorter and sweeter.
But there’s more! You can also send in some arguments:

Resize the image to be 150px in width:
http://example.com/image/55:w150/DSC_0001.jpg

Resize the image to be 150px in width, and give it another name (you can name the image to whatever you want)
http://example.com/image/55:w150/my-cool-image.jpg

Resize the image to 150px in height:
http://example.com/image/55:h150/DSC_0001.jpg

Resize the image to stay within 150px in height and width:
http://example.com/image/55:w150:h150/DSC_0001.jpg

Crop the image to exactly 150px in width and height:
http://example.com/image/55:w150:h150/DSC_0001.jpg

Make a small thumb, and also add an unsharp filter:
http://example.com/image/55:w175:h75:c1:u1/DSC_0001.jpg

Make a small thumb, and also add an unsharp filter, and output as png:
http://example.com/image/55:w175:h75:c1:u1:fp/DSC_0001.jpg

Same as above, but with pipe as the delimeter (you can choose between ,._- and |):
http://example.com/image/55|w175|h75|c1|u1|fp/DSC_0001.jpg

Please note that all the resize stuff where made without adding any querystring to the URL.
This is good for Search Engine Optimization (SEO) reasones, but also for caching reasons.
Google Page Speed will for example give you a higher score because of this!


ChangeLog