WordPress automatically crops featured images to fit the fixed dimensions defined by your theme, which can cut off important parts of a photo. Disabling this behavior requires editing your theme’s functions.php file to change how image sizes are registered, and it can be done with just a couple of lines of code.
Why WordPress Crops Featured Images
Themes and page builders register specific image sizes with fixed width and height values, and WordPress crops any uploaded image to fit those exact dimensions. A typical theme registers several custom image sizes at once, such as add_image_size('colormag-highlighted-post', 392, 272, false) and similar calls for other featured image slots used throughout the theme.
The last parameter in add_image_size() controls whether WordPress hard-crops the image. When this value is true, WordPress forces the image into the exact dimensions specified, cropping anything that doesn’t fit the aspect ratio. This is the setting responsible for auto-cropping.
Disabling Auto-Crop by Editing functions.php
The most direct fix is locating the add_image_size() calls in your theme and changing the crop parameter from true to false.
Access your theme’s files. Go to Appearance > Theme File Editor in your WordPress dashboard, or connect via FTP if you prefer editing outside the dashboard. If you can’t access the WordPress dashboard, you can edit the file by FTP by navigating to /wp-content/themes/your-theme-name/functions.php.
Open functions.php and search for add_image_size. Use Ctrl+F to search for add_image_size once you have the functions.php file open.
Change the crop value from true to false. Each add_image_size() call that ends in true is set to hard-crop. Change that value to false so WordPress resizes proportionally instead of cropping:
add_image_size( 'featured-image-size', 800, 445, false );
- Save the file. After adding the code snippet, click the “Update File” button to save your changes, and your theme will no longer auto-crop featured images.
Disabling a Specific Featured Image Size Entirely
If you want to remove a particular image size from being generated at all — rather than just changing how it’s cropped — you can hook into the size directly. You can disable a specific image size’s behavior entirely using the code add_filter('colormag-featured-image', '__return_false');, replacing the name with whichever custom image size your theme registers.
Keep in mind this filter name will vary by theme, since each theme names its registered image sizes differently. Check your theme’s functions.php for the exact size names before applying this filter.
Disabling Auto-Crop for Default WordPress Image Sizes
If the cropping issue is coming from WordPress’s built-in thumbnail, medium, or large sizes rather than a theme-specific size, you can address it directly in your dashboard settings or with a snippet targeting those defaults.
In your dashboard, go to Settings > Media and set the width and height fields for Thumbnail, Medium, and Large to 0. Setting the dimensions for these sizes to 0 or removing the values entirely prevents WordPress from generating cropped versions for the default thumbnail, medium, and large sizes.
For more control via code, add this to your theme’s functions.php:
function disable_default_image_cropping() {
update_option( 'thumbnail_crop', 0 );
}
add_action( 'after_setup_theme', 'disable_default_image_cropping' );
This ensures the crop setting stays disabled even if a plugin or update resets the Media Settings page.
Setting a Custom Uncropped Size for the Featured Image
If you disable cropping but still want the featured image to display at a consistent size across your site, you can register a new size manually and calculate its height to match your original images’ aspect ratio.
To calculate the correct height, use an aspect ratio calculator: if your featured image display area is 400 × 250 pixels and your original images are 1024 pixels wide, entering these values calculates the height needed to display the entire image without cropping — 640 pixels in that example.
Once you have the correct dimensions, register the new size in functions.php:
function custom_featured_image_size() {
set_post_thumbnail_size( 1024, 640, false );
}
add_action( 'after_setup_theme', 'custom_featured_image_size' );
Regenerating Existing Featured Images
Disabling auto-crop only affects images uploaded after the change — it won’t retroactively fix images that were already cropped under the old settings. To update existing images, you’ll need a plugin.
Install and activate the Regenerate Thumbnails plugin from the WordPress Plugins page, then find it under Tools > Regenerate Thumbnails in your dashboard once activated. On the plugin’s page, select the option to regenerate all thumbnail sizes and wait until the process finishes resizing your images according to the new, uncropped settings.
Things to Keep in Mind After Disabling Cropping
Turning off auto-crop shifts more responsibility onto you for how images look on the front end.
- Upload pre-sized images. With automatic cropping disabled, it’s important to manually optimize and size your images before uploading, since you now control the dimensions and quality directly rather than relying on WordPress to fix inconsistent sizes.
- Watch for layout shifts. Since uncropped images may have varying aspect ratios, some theme layouts (especially grid-based blog listings) can look uneven if source images aren’t consistently sized before upload.
- CSS alone won’t fix already-cropped images. If an image has already been physically cropped and saved by WordPress, no amount of CSS styling can restore the cropped-out portions. The image displayed is a genuinely cropped file, not something styled to appear cropped, so CSS can enlarge or shrink it but cannot “undo” the crop. Regenerating thumbnails from the original upload is the only way to recover the full image.
Join The Discussion
Did changing the crop parameter in functions.php work cleanly for your theme, or did you run into a page builder or plugin that overrides these settings? Share what worked (or didn’t) for your setup below.