catalancho
10/29/2019 - 6:16 PM

add_image_size

//Crop Mode #Crop Mode

//Set the image size by resizing the image proportionally (without distorting it):
add_image_size( 'custom-size', 220, 180 ); // 220 pixels wide by 180 pixels tall, soft proportional crop mode
//Set the image size by cropping the image (not showing part of it):
add_image_size( 'custom-size', 220, 180, true ); // 220 pixels wide by 180 pixels tall, hard crop mode
//Set the image size by cropping the image and defining a crop position:
add_image_size( 'custom-size', 220, 220, array( 'left', 'top' ) ); // Hard crop left top
//When setting a crop position, the first value in the array is the x axis crop position, the second is the y axis crop position.