Thumbnail On Demand
Generate thumbnails on demand
by AmphiBee · github.com/amphibee/thumbnail-on-demand · website
★ 5stars
756composer installs
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/amphibee/thumbnail-on-demand/archive/refs/heads/main.zipAlso on Packagist as amphibee/thumbnail-on-demand:
composer require amphibee/thumbnail-on-demandFrom the readme
Thumbnail On Demand
- EN
- FR
EN
Thumbnail On Demand is a WordPress plugin designed to better control image thumbnail generation and generate them on-the-fly. This plugin optimizes the management of thumbnails by generating only those that are truly necessary, thus reducing server resource consumption and storage space usage.
How it works
The plugin intercepts thumbnail requests for images and generates the required sizes on-the-fly if they don't already exist. It also allows you to define your own image resizing class by implementing the ImageResizerInterface and defining the IMAGERESIZERCLASS constant.
Customizing the image resizing class
To use your own image resizing class, define the IMAGERESIZERCLASS constant in your wp-config.php file or in a custom plugin:
Your custom class should implement the AmphiBee\ThumbnailOnDemand\Contracts\ImageResizerInterface and define the resize() method.
Available filters
The plugin provides two filters to customize the automatically generated thumbnail sizes.
tod/includethumbnailsizes This filter allows you to include specific thumbnail sizes that will be automatically generated when an image is uploaded. By default, no sizes are in