I want to add new image dimention i.e tab_thumb thats width is 260px and height is 80px. How can i add.
Hey Taha,
Thanks for your patience, add this code to the end of your child theme functions.php file in Appearance ▸ Editor:
add_filter('avf_modify_thumb_size', 'custom_modified_thumb_sizes', 10, 1);
function custom_modified_thumb_sizes(array $sizes) {
$sizes['tab_thumb'] = array('width' => 260, 'height' => 80, 'crop' => true);
return $sizes;
}
then upload a new image, then add your image to the image element:
then go to the style tab and select the new size:
the backend may show the full uncropped image, but the frontend will show the new image size.
After testing, if you want all of your images to have this new size, install the Regenerate Thumbnails plugin and run it.
Since your new size won’t work will for most images changing 'crop' => true);
in the code to 'crop' => false);
won’t help, unless you are uploading a image that is already 260×80, or a multiple of that aspect ratio without cropping.
For example, this image was a very large image, and after Regenerate Thumbnails it shows the in the new size:
Best regards,
Mike