You can pest following code in function.php.
add_theme_support('post-thumbnails');
add_image_size( $name, $width, $height, $crop);
add_image_size('Home Top', 120, 120, true);
add_image_size('Home bottom', 270, 90, false);
add_image_size('Archive thumb', 150, 75, true);
add_image_size('Special', 397, 224, true);
add_image_size( 'Test cropped', 500, 500, true );
function sgr_display_image_size_names_muploader( $sizes ) {
$new_sizes = array();
$added_sizes = get_intermediate_image_sizes();
foreach( $added_sizes as $key => $value) {
$new_sizes[$value] = $value;
}
// This preserves the labels in $sizes, and merges the two arrays
$new_sizes = array_merge( $new_sizes, $sizes );
return $new_sizes;
}
add_filter('image_size_names_choose', 'sgr_display_image_size_names_muploader', 11, 1);
This code worked for me in wordpress3.5.
Regards
Onkar Kubal
Related Posts:
- How To Delete Desired Image Sizes From wp-content/uploads?
- Thumbnails of same size with different crop
- image_resize in wp3.5 change to wp_get_image_editor and wont work
- Why is wp_get_attachment_image_src returning wrong dimensions? [duplicate]
- Stop wordpress from creating multiple size images
- wp_get_attachment_image() not working when trying to add width and height attributes
- Add_image_size not cropping
- Custom image sizes only for thumbnails
- Use ‘medium’ size with catch_that_image() function
- How can I get I get the thumbnail custom size dimensions?
- Is there a way to avoid using add_image_size? Best way to manage images
- How to fit image to Thumbnail canvas size?
- Custom image size mixes width and height in output
- Image Sizes/Thumbnails not generating on local install Ampps
- Best way to manage theme images
- add_image_size cropping changes on Mobile devices
- Thumbnails resized and not cropped in the center
- get_intermediate_image_sizes() returning different values depending on is_admin()
- Media Library Image Sizes in Bones theme (add_image_size)
- Check if custom thumnail size image has been cropped to the correct dimensions
- How to disable WordPress from creating thumbnails?
- get_the_post_thumbnail_url with an unregistered size
- Cropped featured image replaces original image in gallery
- Settings in ‘Media > Settings’ is ignored when inserting images
- How do I delete all generated images from my server except those currently used in posts
- Can WordPress crop only the post thumbnails?
- WordPress remove EXIF Data from specific Thumb
- Autogenerated Thumbnail compression depending on size
- Cannot access the thumbnails of attachment images… Cannot find the reason
- Thumbnail is corrupt but image is good
- Thumbnails are not cropped even after selecting “Crop thumbnail to exact dimensions”
- Additional image sizes are not being generated
- Media Gallery Upload Thumbnail Compression is Changing Image Hue
- Disable wordpress image sizes generation
- How to disable multiple thumbnail generation?
- Lazyload post thumbnails
- Customize WooCommerce Product Images (Placement and size) [closed]
- Show featured image next to post-teasers in Genesis Framework?
- prevent wordpress from creating thumbnails of an image
- hover image appears below placeholder instead of overlayed
- If I Regenerate Thumbnails, would WordPress delete the existing Thumbnails and replace them with ‘new copies’?
- ‘Thumbnail’ and ‘Medium’ Image sizes are different than expected
- How to get cropped thumbnail source for custom post type
- Open Image Thumbnail in a new page, while clicking on the link
- How to stop thumbnail generation from some images and different size thumbnail generate
- Update old Post image metadata to ‘thumbnail’ wp_attached_file
- How to stop wordpress always displaying full-res images
- Thumbnail position + size
- How to use thumbnail size of image if I’m only using src to get image
- Fixing image names for a site being restored
- force feed readers to pick atom version
- How to create resized versions of images added with wp_insert_attachment
- Is it possible to change image size used for preview thumnail in Add Media popup
- Regenerate thumbnails for images that are not in the media library
- How can i make this in the_post_thumbnail?
- Display number of latest images from wordpress gallery in your homepage
- Post Gallery list attachments except the one used as post thumbnail
- Why WordPress suddenly changed sizes of thumbnails?
- Rebuild thumbnails via WP Cli – how?
- Can we use featured image as third party website image URL
- add_image_size not working
- Thumbnail generating and posting
- Disable Media File Image Link On Mobile Devices
- Product Images Low Quality After Updating From WP 3.5 to 4 [closed]
- How to Make Thumbnail of Post Stay Animated
- adding image to post thumbnail from another server
- Disabling image thumbnails and automatic regeneration
- add youtube thumbnail in index and single.php add video
- wp_get_attachment_image_src() with advanced custom fields returning empty
- Broken thumbnails (sometimes) with TimThumb
- Is it possible to save crop to a different size of the image when in image editor?
- Apply manual image cropping not to thumbnail but medium_large size
- How to use default image as featured image by implement some code in function.php
- Auto Generate Thumbnail
- WordPress Multisite: Images moved to /sites/1?
- Can’t add thumbnail theme support
- unsharp thumbnails after uploading image
- ADD class to all my images (thumbail)
- How to view exact image dimensions of a media in Admin view?
- I cannot upload images to post or the media library in wordpress
- How to reduce unnecessary thumbnail creation?
- How to disable post-thumbnail from generation?
- WordPress can’t detect any thumbnails size?
- how to place ELSE on if function on multipostthumbnails? [closed]
- resizes images on the fly
- How Do I Auto Generate Thumbnail from First Embedded Image?
- Why doesn’t WordPress make thumbnails for videos?
- Generate thumbnails like 500px.com
- get the post thumbnail returns the full size
- Display thumbnail of child, parent and ancestor using featured thumbnails
- Making a thumbnail if there exist a link with. jpg or .png extension in WordPress
- Can’t edit thumbnails
- Imagem resolution responsive
- Thumbnails from video posts not working after upgrading to WP 3.4
- WP is showing wrong image dimensions
- PHP-Code inside Href-Tag
- Thumbnail informations (meta)
- How to include featured image on blog post preview?
- Thumbnail size keeps resetting automatically
- Media Library shows default image instead of image preview