Want to skyrocket the popularity of your plugin and reach millions of eager users? Look no further than WP Hive. Gain credibility through in-depth reviews, drive conversions with targeted email marketing, and boost visibility with strategic social promotion and exposure
Sorry, pal! The plugin couldn’t pass all our tests. No hard feelings, right?
Tests done by WP Hive test script Results
Minimal impact on memory usage The memory usage of this plugin is less than the average memory usage of other plugins on WordPress.org + 200KB. Check FAQ for more.
Minimal impact on pagespeed The impact of this plugin on PageSpeed is less than the average impact of other plugins on WordPress.org + 1000 milliseconds
No PHP errors, warning, notices WP Hive automated test found no PHP error while activating this plugin on our server
No Javascript issues WP Hive automated test found no JavaScrip error while activating this plugin on our server
Latest PHP 8.1.12 compatible WP Hive automated test found the plugin fully compatible with the latest version of PHP
Latest WordPress 6.1.1 compatible WP Hive automated test found the plugin fully compatible with the latest version of WordPress
Optimized database footprint The plugin creates less than 50 database tables
No activation errors WP Hive automated test found no activation error while activating this plugin on our server
No resource errors WP Hive automated test found no resource error/s while trying this plugin on our server
Frequently updated The plugin was not updated at least once in the last 90 days
All the plugins are tested on the same server with exactly same configuration via test script that automatically activates and logs the data WP Hive shows.
All the scripts run on a VPS with 8 CPU cores and 8 GB of RAM.
The test sites are hosted on Google Cloud VM instances, one site/plugin per instance. The machine type is n1-standard-1. The server is a 8 core CPU with 8GB of RAM.
The test sites are hosted on Apache/2 server and they are tested on PHP 8.1.12 & WordPress 6.1.1.
The database server is MySQL 10.6.10 and the default PHP memory limit is 512M.
Disclosure: When you buy through affiliate links on this site, WP Hive may earn a commission which we use to keep the site running. Learn more →
About Kama Thumbnail
Description
Convenient way to create post thumbnails on the fly without server overload. The best alternative to scripts like “thumbnail.php”. Supports Multisite. Usage 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'); ?>....
Convenient way to create post thumbnails on the fly without server overload.
The best alternative to scripts like “thumbnail.php”.
Supports Multisite.
Usage
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:
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.
$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');
Reduce image by specified side
In order to get not cropped proportionally rediced image by specified side: by width or height. You need specify only width or only height, then other side will be reduced proportional. And no cropping will appear here.
kama_thumb_img('w=200');
So, width of our image will be 200, and height will be as it will…
Теперь ширина всегда будет 200, а высота какая получится… And the picture will be always full, without cropping.
attr
(str) Allow to pass any attributes in IMG tag. String passes in IMG tag as it is, without escaping.
a_class
(str) class attr of A tag.
a_style
(str) style attr of A tag.
a_attr
(str) Allow to pass any attributes in A tag. String passes in A tag as it is, without escaping.
no_stub
(isset) don’t show picture stub if there is no picture. Return empty string.
yes_stub
(isset) show picture stub if global option in option disable stub showing, but we need it…
post_id | post
(int|WP_Post) post ID. It needs when use function not from the loop. If pass the parameter plugin will exactly knows which post to process. Parametr ‘post’ added in ver 2.1.
attach_id
(int) ID of wordpress attachment image. Also, you can set this parametr by pass attachment ID to ‘$src’ parament – second parametr of plugin functions: kama_thumb_img('h=200', 250) or kama_thumb_img('h=200 &attach_id=250')
allow
(str) Which hosts are allowed. This option sets globally in plugin setting, but if you need allow hosts only for the function call, specify allow hosts here. Set ‘any’ to allow to make thumbs from any site (host).
$src
(string) URL to any image. In this case plugin will not parse URL from post thumbnail/content/attachments.
If parameters passes as array second argument $src can be passed in this array, with key: src или url или link или img:
When parameters passes as string and “src” parameter has additional query args (“src=$src &w=200” where $src = http://site.com/img.jpg?foo&foo2=foo3) it might be confuse. That’s why “src” parameter must passes as second function argument, when parameters passes as string (not array).
#6 Parameter post_id
Get thumb of post ID=50:
I don’t need plugin
This plugin can be easily used not as a plugin, but as a simple php file.
If you are themes developer, and need all it functionality, but you need to install the plugin as the part of your theme, this short instruction for you:
Create folder in your theme, let it be ‘thumbmaker’ – it is for convenience.
Download the plugin and copy the files: class.Kama_Make_Thumb.php and no_photo.jpg to the folder you just create.
Include class.Kama_Make_Thumb.php file into theme functions.php, like this:
require ‘thumbmaker/class.Kama_Make_Thumb.php’;
Bingo! Use functions: kama_thumb_*() in your theme code.
If necessary, open class.Kama_Make_Thumb.php and edit options (at the top of the file): cache folder URL/PATH, custom field name etc.
Conditions of Use – mention of this plugin in describing of your theme.
TODO
Лог stub файлов – чтобы узнать какие файлы были не найдены и на каких страницах
возможно очистить кэш отдельной картинки
брать заглушку из медиабиблиотки в настройках
указывать в альт название записи для kama_thumb_img(), если он пустой и есть ID записи? Но функция работате с URL поэтому альт не всегда можно указать правильно… Может юзать in_the_loop().
Read More >>
Explore all plugins from
Performance
Memory Usage
Average memory usage is2.4 KB
This is less than99%plugins
Page Speed
Average page loading time is increased by
0.01 s
This is faster than99%plugins
Speed Test Benchmark
Learn more how we collect the data
Before plugin activation
After plugin activation
Pages
Benchmark
Change
Average Change
- 0.01s
/(front page)
- 0.07s
/wp-admin/edit-comments.php
+ 0.01s
/wp-admin/edit-tags.php?taxonomy=category
- 0s
/wp-admin/edit.php
- 0s
/wp-admin/index.php
- 0.06s
/wp-admin/media-new.php
- 0.08s
/wp-admin/options-discussion.php
+ 0.09s
/wp-admin/options-writing.php
- 0.04s
/wp-admin/post-new.php
+ 0.17s
/wp-admin/post-new.php?post_type=page
+ 0.1s
/wp-admin/upload.php
- 0.25s
MoreLess
Memory Usage Benchmark
Learn more how we collect the data
Before plugin activation
After plugin activation
Pages
Benchmark
Change
Average Change
+ 2.4KB
/ (front page)
+ 1.25KB
/wp-admin/edit-comments.php
+ 1.35KB
/wp-admin/edit-tags.php?taxonomy=category
+ 3.53KB
/wp-admin/edit.php
+ 3.53KB
/wp-admin/index.php
+ 3.53KB
/wp-admin/media-new.php
+ 2.88KB
/wp-admin/options-discussion.php
+ 1.41KB
/wp-admin/options-writing.php
- 0.32KB
/wp-admin/post-new.php
+ 4.48KB
/wp-admin/post-new.php?post_type=page
+ 3.43KB
/wp-admin/upload.php
+ 1.36KB
MoreLess
Stats
Download Statistics
Plugin Version Usage
More
Database Tables
The plugin has added 0 additional options to your WordPress.
WP-Options
The plugin has added 2 additional options to your WordPress website.
Want to skyrocket the popularity of your plugin and reach millions of eager users? Look no further than WP Hive. Gain credibility through in-depth reviews, drive conversions with targeted email marketing, and boost visibility with strategic social promotion and exposure
Be Part of the Conversation with WordPress Enthusiasts
Using Kama Thumbnail? Great, join the conversation now!
Let’s talk about overall quality, ease of use, stellar support, unbeatable value, and the amazing experience Kama Thumbnail brings to you.