Title: Image sizes creation procedure
Last modified: August 30, 2016

---

# Image sizes creation procedure

 *  [D’TailsPress](https://wordpress.org/support/users/dtailspress/)
 * (@dtailspress)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/)
 * First of all, I quite like your plugin. It has a couple of features that I haven’t
   found in other plugins of this kind, like easily choosing the position for the
   thumbnail when regenerating it (top-left, top-center, top-right, left-center,
   etc.). Which, by the way, I would love to have in the other image sizes.
 * Let’s get to the point now 😛 I tried regenerating one of my images and I found
   a problem, or a complication really. I can read this for one of the image size
   description: “scale to max width of 300 px or to max height of 300px”. And it
   does exactly that, it resizes the image scaling it to a maximum width of 300px,
   instead of cropping the image and then resize it, like WordPress does it by default.
 * My medium image size has a configuration of 300×300 px, and instead of getting
   exactly that, I’m getting an image of 300×169 px.
 * Is there any way to get around this?
 * [https://wordpress.org/plugins/image-regenerate-select-crop/](https://wordpress.org/plugins/image-regenerate-select-crop/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/image-sizes-creation-procedure/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/image-sizes-creation-procedure/page/2/?output_format=md)

 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418267)
 * Hi!
 * If the original image has a landscape proportion and the medium size is of scale
   type (to a max width or a max height), then the final medium image will be generated
   by resizing the original image to it’s largest size (in this case the width for
   a portrait) until it reaches 300px and the height will be proportional.
 * If you want the medium image size to be of exactly 300x300px, then you have to
   change the way the images sizes are configured, to make the medium of crop type,
   not scale (at least this is how I understand the image sizes are configured in
   your site).
 * Another note, the crop options for the images are available only for image sizes
   configured to crop, not for scale type (that is why you see the crop options 
   only for some of the images).
 * Let me know if this helps.
 *  Thread Starter [D’TailsPress](https://wordpress.org/support/users/dtailspress/)
 * (@dtailspress)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418508)
 * So is there a way to get medium and large sizes cropped just like with thumb 
   size?
 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418511)
 * The answer is yes, the default crop settings to be applied general to an image
   size can be set individually for each image size of crop type (not scale) and
   also changed for each cropped image.
 *  Thread Starter [D’TailsPress](https://wordpress.org/support/users/dtailspress/)
 * (@dtailspress)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418512)
 * I don’t see any cropping options for medium and large sizes. Only for thumbnail
   size. Could you give me more details about this?
 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418513)
 * There are two types of image sizes: scale (resize) and crop. By default, WP sets
   the medium and large as scale type and only the thumbnail as crop type.
 * If you want to force the medium or large to a crop type, then you have to make
   changes programmatically in your theme or with a plugin. Does this answer your
   question?
 *  Thread Starter [D’TailsPress](https://wordpress.org/support/users/dtailspress/)
 * (@dtailspress)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418514)
 * I’m not completely sure what you mean with programmatic changes, but this is 
   how I coded the image sizes in my theme:
 *     ```
       add_image_size( 'large', 620, '', true); // Large Thumbnail
       add_image_size( 'medium', 300, 300, true); // Medium Thumbnail
       add_image_size( 'thumbnail', 160, 160, true); // Thumbnail
       ```
   
 * Is there anything else I should do so your plugin allows the cropping feature
   for medium and large sizes? Because, as you can see, the medium size is already
   being cropped by default, but when I activate your plugin, it doesn’t work anymore,
   WP will just resize them without cropping them.
 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418515)
 * The codex mentions : [http://codex.wordpress.org/User:Esmi/add_image_size%28%29](http://codex.wordpress.org/User:Esmi/add_image_size%28%29)
 * add_image_size( $name, $width = 0, $height = 0, $crop = FALSE)
 * My understanding from the sample you gave is that when you put the crop option,
   you must specify the width and height of the crop, your height is not mentioned.
 * add_image_size( ‘large’, 620, ”, true); // Large Thumbnail
 * However, the image size you set in the theme can be override in another place.
   This plugin does not change your image sizes.
 * It might be helpful if you can provide a screenshot of the entire set of settings
   you see for the plugin.
 * Also, please check if the image sizes changes are added with a similar hook like
   described here [https://developer.wordpress.org/reference/functions/add_image_size/](https://developer.wordpress.org/reference/functions/add_image_size/).
 *  Thread Starter [D’TailsPress](https://wordpress.org/support/users/dtailspress/)
 * (@dtailspress)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418521)
 * I tried everything you suggested, but it’s still not working. Does the medium
   and large sizes allow you to crop them?
 * Something I discovered is that it works fine for custom image sizes.
 * Here goes my config:
    [IMAGE](http://postimg.org/image/hhv40exfz/)
 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418522)
 * K, and where are you setting the medium and large to be of crop type ?
 *  Thread Starter [D’TailsPress](https://wordpress.org/support/users/dtailspress/)
 * (@dtailspress)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418523)
 * That’s the problem. I don’t have them, and I don’t know why :S Everything I can
   see is what I showed you in the picture above.
 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418524)
 * But if you do a global search in your project can you find the lines where you
   think the medium and large are set to be of crop type ?
 * You have to make sure that you have the explicit setup for these under a proper
   hook, use the “after_setup_theme” action hook.
 *  Thread Starter [D’TailsPress](https://wordpress.org/support/users/dtailspress/)
 * (@dtailspress)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418526)
 * Yes, its setup looks just like that in my functions.php file:
 *     ```
       function my_thumb_sizes() {
       	add_image_size( 'large', 620, '', array( 'center', 'center' ) ); // Large Thumbnail
       	add_image_size( 'medium', 300, 300, array( 'center', 'center' ) ); // Medium Thumbnail
       	add_image_size( 'thumbnail', 160, 160, true); // Thumbnail
       	add_image_size( 'custom-size-1', 320, 160, true); // Custom size 1
       	add_image_size( 'custom-size-2', 620, 320, true); // Custom size 2
       }
   
       add_action( 'after_setup_theme', 'my_thumb_sizes' );
       ```
   
 *  Thread Starter [D’TailsPress](https://wordpress.org/support/users/dtailspress/)
 * (@dtailspress)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418533)
 * Anything?
 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418534)
 * Have you tried to set the large and medium with the crop option as bool (like
   what you did for the thumbnail) ?
 *  Thread Starter [D’TailsPress](https://wordpress.org/support/users/dtailspress/)
 * (@dtailspress)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/#post-6418540)
 * Yes, I’ve tried all that. Even in different installations of WP.
 * Could you show me a screen capture of your configuration page? Just to be sure
   that I’m the one having the problem.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/image-sizes-creation-procedure/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/image-sizes-creation-procedure/page/2/?output_format=md)

The topic ‘Image sizes creation procedure’ is closed to new replies.

 * ![](https://ps.w.org/image-regenerate-select-crop/assets/icon-128x128.gif?rev
   =2371819)
 * [Image Regenerate & Select Crop](https://wordpress.org/plugins/image-regenerate-select-crop/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/image-regenerate-select-crop/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/image-regenerate-select-crop/)
 * [Active Topics](https://wordpress.org/support/plugin/image-regenerate-select-crop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-regenerate-select-crop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-regenerate-select-crop/reviews/)

## Tags

 * [crop](https://wordpress.org/support/topic-tag/crop/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [resize](https://wordpress.org/support/topic-tag/resize/)

 * 16 replies
 * 2 participants
 * Last reply from: [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/image-sizes-creation-procedure/page/2/#post-6418541)
 * Status: not resolved