woutr_be
woutr_be

Reputation: 9722

Wordpress multiple thumbnails of different sizes

I'm trying to look for a plugin/solution that allows me to upload multiple thumbnails of different sizes.

For a post I would need the following:

How could I achieve this?

Upvotes: 0

Views: 128

Answers (2)

Daryll Doyle
Daryll Doyle

Reputation: 453

Maybe try adding custom fields to the admin system. Either manually by adding custom meta boxes:

http://codex.wordpress.org/Function_Reference/add_meta_box

Or through a plugin (My preferred option):

http://wordpress.org/plugins/advanced-custom-fields/

This way you can upload a different image for each size option you want.

Upvotes: 1

Stewartside
Stewartside

Reputation: 20905

What you are trying to achieve is possible but not in the sense that a thumbnail is generated, rather another version.

When you currently upload an image, it creates up to 4 versions of the file in varying sizes.

These being:

the_post_thumbnail('thumbnail');       // Thumbnail (default 150px x 150px max)
the_post_thumbnail('medium');          // Medium resolution (default 300px x 300px max)
the_post_thumbnail('large');           // Large resolution (default 640px x 640px max)
the_post_thumbnail('full');            // Full resolution (original size uploaded)

You can add other sizes as well with custom names. To do this, you add a small line of code within your functions.php file like below:

add_image_size( 'custom-size', 220, 180 ); // 220 pixels wide by 180 pixels tall, soft proportional crop mode

As there are some limitations with naming and other details about cropping, full detail on this can be found HERE

Upvotes: 0

Related Questions