WordPress plugin intelligence profile

thumbGen

This plugin creates a function named thumbGen() that allows to show any image in the specified size (plus many other things).

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 4.1
Current version2.7.1
WordPress coverageTested up to WordPress 4.1
Minimum stackWP 2.9.0 · PHP —
Directory statusactive
Last directory update30 Jan 201511y ago
Active installations100Adoption metric — not a quality score
WordPress.org rating3.0 / 5 from 2 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records thumbGen version 2.7.1 as active, updated 11y ago and tested up to WordPress 4.1.

Overview

About this plugin

This plugin is made for developers.

It creates a function named thumbGen() that allows to show any image in the specified size. Additionally you can specify values like crop, center, rotation and effects.

It saves all generated thumbs in a cache folder, so it won’t overload your server at all.

Usage

To use this function you just need to use this line code:

>

[image:] the URL of the original image you need to create a thumbnail from (needed).

[width:] the width you need for the generated thumbnail (default=0 – if not specified it gets the

proportional value from the specified height).

[height:] the height you need for the generated thumbnail (default=0 – if not specified it gets the proportional value from the specified width).

note: if you don’t specify the with AND height (or if you set both to 0), the image will be generated in the source size.

Additional parameters

[filename:] some people have troubles with duplicated names, so I’ve added this parameter for you to specify a new filename (or ID or something like that) in order to differentiate each file (if not set it will use the source filename).

[md5:] by default, the images are generated with an md5 encode filename. If you don’t want the generated file to have an encoded name set this to 0

[force:] force thumb creation, even if it already exists (default=0) (NOT RECOMENDED! – use it just for testing or debugging)

[crop:] if you want the thumbnail to be cropped (no image deformation) if the width and height are different from the original image, set this value as 1 or true. If you want the content of the thumbnail to be resized to fit the space (image deformation) set this to 0 or false (default=1).

[halign:] horizontal align of the croped image. You can set it to left, center or right (default=center)

[valign:] vertical align of the croped image. You can set it to top, center or bottom (default=center)

[effect:] you can apply two effects: grayscale and sephia

[rotate:] you can specify a rotation angle

[background:] hex color (like #ffffff) to apply on the background ONLY when you rotate the image. If you don’t want a color applied you can set this to transparent (default=transparent)

[return:] if set to 1 (or true) the image name will be returned instead of printed (default=0).

[preserveAnimation:] if set to 1 (or true) it will show animated gif’s with motion but without applying other parameters. Otherwise, it will show the first frame of the animated gif resized.

[quality:] you can chooos from 0 to 9, where 0 is the worst quality (lower file size) and 9 is the best (bigger file size). The default value is 7.

Examples of usage

In this example I will not explain detailed how this WordPress code works, but I will show this as an example of this plugin usage:

>

This example reads the first attached image of a post and save it’s information in a variable called $img. In the thumbGen function the first parameter is $img[0] and that’s the image URL. The second and third parameters are the width and height of the generated thumbnail we need.

The rest of the parameters are defined in the string in the format parameter=value, concatenated with an &. the values not specified will use their default value.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • generator
  • image
  • images
  • thumb
  • thumbnail
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 4.1

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 4.1.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to4.1
Minimum requirementsWordPress 2.9.0 · PHP not listed
Update activity30 Jan 201511y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.