Hi,
I used this code to add a custom size and it worked fine. How do I add an additional size?
/* additional image size(s)
*
*/
// add new size
add_image_size( ‘bigger-square’, 250, 250, true );
// make the new size available in the media library (and image element etc.)
add_filter( ‘image_size_names_choose’, ‘my_custom_sizes’ );
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
‘bigger-square’ => __( ‘Bigger Square’ ),
) );
}
Hey williamslyd,
To add more custom image sizes, Try adding this code to the end of your functions.php file in Appearance > Editor:
// add new size
add_image_size( 'bigger-square', 250, 250, true );
add_image_size( 'another-square', 350, 350, true );
add_image_size( 'yet-another-square', 450, 450, true );
// make the new size available in the media library (and image element etc.)
add_filter( 'image_size_names_choose', 'my_custom_sizes' );
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'bigger-square' => __( 'Bigger Square' ),
'another-square' => __( 'Another Square' ),
'yet-another-square' => __( 'Yet Another Square' ),
) );
}
To adjust your new image sizes so they are cropped the way you would like, please read this article
Best regards,
Mike