Change Width of Featured Image Thumbnail on Add/Edit Post Page

Okey i think i understand what you want to do.

Here is a function that changes the html-output of the feature image in admin. It will look for the attached feature image ID and output it by using wp_get_attachemt_link() so you can change the size by the parameter $size. Here is a function that should work:

function wpse_111428_change_feature_image_admin( $content ) 
{
    global $post;
    $size = 100;

    $id = get_post_meta( $post->ID, '_thumbnail_id', true );

    if( $id )
    {
        return wp_get_attachment_link( $id, array( $size, $size ) );
    }
}
add_filter( 'admin_post_thumbnail_html', 'wpse_111428_change_feature_image_admin' );

I found the original code in \wp-admin\includes\post.php that WordPress uses to output the feature image.

Leave a Comment

error code: 523