Is it possible that I can resize/crop using a new image custom size in wp?
Context: In my website, I have uploaded hundreds of images and now I want to create a new Custom Image size but it won’t apply. As I have known that resizing and cropping an images in wordpress applies only in a new uploaded image, just like in this code below:
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'gallery-image' => __('gallery-image'),
'portfoliopin-item' => __('portfoliopin-item'),
) );
}
if ( function_exists( 'add_image_size' ) ) {
add_image_size( 'gallery-image', 588, 402, true );
}
My question now is that:
It is possible that I can resize/crop an existed images using a custom image size name, just like the code above?
You need to regenerate image sizes.
This plugin does what you need and also it deletes non existing old image sizes.
https://wordpress.org/plugins/force-regenerate-thumbnails/
After you activate the plugin all you need is to click to a button and it does all the work.