Why WordPress automatic cropping all my images?

WordPress by default is designed to generate 3 types of cropping of any uploaded images (Media):

  • Thumbnail (typically 150px × 150px)
  • Medium (typically 300px × 300px)
  • Large (typically 1024px × 1024px)

It’s to ensure site speed with different sizes where necessary. So, with uploading the Original image there would be at least 4 files-

  1. The Original File (not-cropped),
  2. Large,
  3. Medium, and
  4. Thumbnail.

As you already know that, from /wp-admin/options-media.php, you can change the default size’s dimensions too. So you can still use the default sizes for your custom purpose. But if you still need a new size other than the three, WordPress allows you to add new image sizes too.

Using add_image_size() function with your desired parameter allows you to add new size for your site. Use the function into your functions.php to add your desired image size:

add_image_size( $name, $width, $height, $crop );

Where —
$name : string write the name within single quote, i.e. 'portfolio'
$width: integer write the width you want, i.e. 500 (in px)
$height: integet write the height you want, i.e. 300 (in px)
$crop: boolean write true if you want to hard-crop the image, otherwise use false

Typically we can call different Featured Image into any place of our theme by using:

the_post_thumbnail( 'medium' ); //it will display only the medium size of the original image

If you want to use your new size, use:

the_post_thumbnail( 'portfolio' ); //as I named my size as 'portfolio'

WARNING: As, by default WordPress is generating 3 customizable image sizes, it’s creating 4 files for each images. Using more new sizes will increase the number of files into your site host. So, using more image sizes will be a matter for your site’s host-space issue— it’ll consume more site spaces.

EDIT

And after adding every new image size, a most important plugin is:

» Regenerate Thumbnail — WordPress Plugin

In reality the newly assigned image size can be available only into newly uploaded images. So, to get the new size for all the previously uploaded images too, you will need the plugin to be installed and regenerate all the thumbnails again. It’d be one-time measure that would last forever*.

And your main answer should be:
Site Speed: WordPress crops images to increase site speed. If you use Google PageSpeed, you’ll be known that it suggests:

Serve scaled images
Properly sizing images can save many bytes of data.
Learn More

EDIT 2

As you are already suggested, if your plugin use a similar add_image_size() function, it can create a new image size. So after disabling your plugins, if you use the Regenerate Thumbnails plugin to regenerate the thumbnails, then you will get the actual sizes. If that doesn’t help, then check your theme’s functions.php or any added functions file for such add_image_size() function, and now you know what to do.

Leave a Comment