Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

breathelifein on "Creating a new image size and having it as an option on the Media Library"

$
0
0

I'd like to create extra, custom image sizes, and then be able to chose from them when inserting an image to a post using the Media Library.
I tried following this post from the Codex [http://codex.wordpress.org/Function_Reference/add_image_size] and some others I found when googling, but I can't seem to be able to make it work.

I added to my functions.php:

if(function_exists('add_theme_support'))
add_theme_support('post-thumbnails');
add_image_size('thumb_small', 100, 127, true );
add_image_size('thumb_medium', 80, 102, true );

Then

add_filter( 'image_size_names_choose', 'my_custom_sizes' );
function my_custom_sizes( $sizes ) {
    return array_merge( $sizes, array(
        'thumb_small' => __( 'Miniatura P' ),
        'thumb_medium' => __( 'Minuatura M' ),
    ) );
}

But still, these size options don't show on my Media Library.
What am I doing wrong? How can I get it to work?
Thanks.


Viewing all articles
Browse latest Browse all 8245

Trending Articles