Mike Hi! It is possible without plugin to add ability edit custom thumbnail image size and apply changes to it?

  • @Roy van Wensen Thank for reply! Ive seen this function, but it is for old version of WP to select display images in posts.
    – Mike
    Commented Jun 11, 2019 at 15:31
  • Actually Roy's answer is correct. I just sampled it on Gutenberg on the latest WP build. If the image size doesn't exist for the image uploaded, then it won't show in the dropdown. Add the code and upload a fresh image, you should see the dropdown.
    – Faye
    Commented Jun 11, 2019 at 19:53

2 Answers 2

add_image_size( 'medium-something', 480, 480 );

// Register the useful image size for use in Add Media modal
add_filter( 'image_size_names_choose', 'your_custom_sizes' );
function your_custom_sizes( $sizes ) {
    return array_merge( $sizes, array(
        'medium-something' => __( 'Medium Something' ),
    ) );

Be aware that if the size does not already exist for an image, it will not be an available option in the dropdown. New image sizes are applied only to new uploads without regenerating thumbnails for all existing images.

  • @Faye Thank for your reply! Yes this is work for image size chose in post. But i want to show this custom image size in WP media editor, to able to do manual crop (recrop for custom thumbnail) and apply changes to this custom image, not default thumbnail. Please see pict above.
    – Mike
    Commented Jun 12, 2019 at 11:11
  • Ah, I see. I'll take another look.
    – Faye
    Commented Jun 12, 2019 at 15:35

After looking into this I think the answer is no.

It looks like the area was built as a manner to preserve the thumbnail, or alter the thumbnail (which has a specific use case in WordPress), when making edits to an image. That's why medium, full, and large don't appear here as options. The point is "if you're messing with your image, how do you want to handle the thumbnail?"

If you need a custom thumbnail image size, you're better off editing the thumbnail and then you can use this area to control the impact on that when editing images. I don't think extending this to repurpose it for "choose your image size to edit" is something you can do without a more complex plugin.

Steps to change default thumbnail size:

  1. Go to your WordPress dashboard.
  2. Navigate to the Settings > Media tab.
  3. Look for the Image sizes > Thumbnail size section.
  4. Change the default width and height of your thumbnails in pixels.
  • thank you for reply! Unfortunately I could not find in google the way to do this. I already use custom thumb size in my theme, but some auto cropped thumbs need to be re cropped manualy to highlight the main thing. Dont want but have to use plugin for this task
    – Mike
    Commented Jun 12, 2019 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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