WP-Optimize
95Get caching and more with this powerful cache plugin. Cache, optimize images, clean your database and minify f...
Creates post thumbnails on fly and cache the result. Auto-create of post thumbnails based on: WP post thumbnail OR first img in post content OR attach …
Kama Thumbnail is a WordPress plugin designed for developers to create post thumbnails dynamically without causing server overload. It works by resizing images and caching them for quicker loading times on subsequent page views. The plugin requires you to implement its functions in your theme or plugin for it to operate effectively.
It supports Multisite and allows for custom URL thumbnails from local servers, with security settings to manage external images. This plugin is suitable for developers looking to enhance image handling on their WordPress sites.
Best for: This plugin is best for developers who need to manage post thumbnails efficiently.
What it does well
Where it falls short
Kama Thumbnail offers a practical solution for developers needing dynamic thumbnail creation, though it requires some technical knowledge to use effectively.
Timur Kamaev's own description of Kama Thumbnail, lightly tidied.
Convenient way to create post thumbnails on the fly without server overload.
The best alternative to scripts like “thumbnail.php”.
Supports Multisite.
The plugin for developers firstly, because it don’t do anything after install. In order to the plugin begin to work, you need use one of plugin function in your theme or plugin. Example:
<?php echo kama_thumb_img( 'w=150 &h=150' ); ?>
Using the code in the loop you will get ready thumbnail IMG tag. Plugin takes post thumbnail image or find first image in post content, resize it and create cache. Also creates custom field for the post with URL to original image. In simple words it cache all routine and in next page loads just take cache result.
You can make thumbs from custom URL, like this:
The URL_TO_IMG must be from local server: by default, plugin don’t work with external images, because of security. But you can set allowed hosts on settings page: Settings > Media.
All plugin functions:
// return thumb url URL
echo kama_thumb_src( $args, $src );
// return thumb IMG tag
echo kama_thumb_img( $args, $src );
// return thumb IMG tag wraped with <a>. A link of A will leads to original image.
echo kama_thumb_a_img( $args, $src );
// to get image width or height after thumb creation
echo kama_thumb( $optname );
// ex:
echo '<img src="'. kama_thumb_src('w=200') .'" width="'. kama_thumb('width') .'" height="'. kama_thumb('height') .'" alt="" />';
Parameters:
$args (array/string)
Arguments to create thumb. Accepts:
w | width
(int) desired width.
h | height
(int) desired height.
if parameters w and h not set, both of them became 100 – square thumb 100х100 px.
notcrop
(isset) if set crop parameter become false – crop=false.
crop
(isset) Control image cropping. By default always true.
To disable cropping set here false/0/no/none or set parameter 'notcrop'. Then image will not be cropped and will be created as small copy of original image by sizes settings of one side: width or height – here plugin select the smallest suitable side. So one side will be as it set in w or h and another side will be smaller then w or h.
Cropping position
Also, you can specify string: 'top', 'bottom', 'left', 'right' or 'center' and any other combinations of this strings glued with /. Ex: 'right/bottom'. All this will set cropping area:
'left', 'right' – horizontal side (w)'top', 'bottom' – vertical side (h)'center' – for both sides (w and h)When only one value is set, the other will be by default. By default: 'center/center'.
Examples:
// image will be reduced by height, and width will be cropped.
// "right" means that right side of image will be shown and left side will be cut.
kama_thumb_img('w=200 &h=400 &crop=right');
// image will be redused by width, and height will be cropped.
// "top" means that the top of the image will be shown and bottom side will be cut.
kama_thumb_img('w=400 &h=200 &crop=top');
// you can specify two side position at once, order doesn't matter
kama_thumb_img('w=400 &h=200 &crop=top/right');
Other plugins for making sites fast.
Get caching and more with this powerful cache plugin. Cache, optimize images, clean your database and minify f...
All-in-one unbeatable acceleration & PageSpeed improvement: caching, image/CSS/JS optimization...
Comprehensive image optimization with WebP, AVIF, Lazy Load, and more. Optimize images automatically for Faste...
Easy to use Under Construction Page & Coming Soon Page. Enable Under Construction Mode in seconds & sh...
Compress and optimize images, enable lazy load, serve WebP & AVIF, and speed up your site with a global im...
Speed up your website by using our WebP & AVIF Converter. Optimize images and serve WebP and AVIF images i...