This page looks best with JavaScript enabled

how to disable auto crop images in wordpress

 ·  ☕ 1 min read  ·  👽 john hashim

Normally it is because a WordPress theme uses the thumbnails on its code: in loops, galleries, etc. It is defined in the file functions.php:

add_image_size( $name, $width, $height, $crop );
For example, like this:

1
2
3
4
5
6
<?php
add_theme_support('post-thumbnails');
add_image_size('custom-thumbnail', 80, 80, true );
add_image_size('medium-thumbnail', 180, 120, true );
add_image_size('large-thumbnail', 571, 300, true );
?>

I don’t recommend you to remove the code if you really want to keep the good working of your theme. If you want to remove it, you will need to delete the calls in the other files where it is used; commonly in the file loop.php.

Share on

john hashim
WRITTEN BY
john hashim
Web Developer