I have some custom image sizes set in my functions and it works just as one would expect, but I am would like this custom image size to be present when a user adds images to a post.

You know when you add an image to a post, in the bottom area it gives you the option to choose from predefined sizes; basically I would like to add my own size to this area...is that possible?


I ended up doing this:

add_filter( 'image_size_names_choose', 'jss_custom_image_sizes' );
function jss_custom_image_sizes( $sizes ){
    $custom_sizes = array(
        'customsize1'        =>        'Post Rectangle Image',
        'customsize2'        =>        'Post Square Image',
    return array_merge( $sizes, $custom_sizes );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.