Increasing or decreasing the size of thumbnail image is possible with the combination of some modifications in functions.php file and using AJAX Thumbnail Rebuild Plugin. Let’s see it, how!
Follow these steps:
- Download AJAX Thumbnail Rebuilder and activate it from wp-admin > Plugins
- Locate the below mentioned code in the functions.php file located in the theme’s root folder at around line number 201 (generally, when not using any Templatic add-on like digital downloads)
add_image_size( 'event-home-thumb', 100, 100, true );
add_image_size( 'home-page-slider', 2400, 528, true );
add_image_size( 'thumbnail', 210, 210, true );
add_image_size( 'taxonomy-thumbnail', 310, 150, true );
add_image_size( 'taxonomy-slider', 640, 200, true );
Before every image size, the action name is given where the mentioned size will affect.
E.g. In 1st line of above code, dimensions “100, 100” are given to “event-home-thumb” which means that it will affect the home page event thumbnails.
- Likewise you can specify your desired image size in front of particular action name as per your requirement.
- Save your modifications in the PHP file.
- Go to wp-admin > Tools > Rebuild Thumbnails
- Check mark the option for which you want to change the image size
- click “Rebuild All Thumbnails”
- Refresh your site’s front end, your changes must be in effect now
But what if you are using the Digital Downloads add-on?
Then, you can follow the same process; just locate the above code at around line number 52 in dd_functions.php located at \wp-content\plugins\DigitalDownloads\library.