How to Turn On Cropping for Thumbnails in WordPress

How to Turn On Cropping for Thumbnails in WordPress

Do thumbnail images on your site look all squashed? Maybe all the people in your photos look super skinny or extra wide?

In today’s Weekend WordPress Project, I’ll show you a quick and easy way to crop your thumbnails instead of scaling them.

Thumbnails feature image

To crop thumbnail images for different sizes, just add the following code to your functions.php file:

// Standard Size Thumbnail
if(false === get_option("thumbnail_crop")) {
add_option("thumbnail_crop", "1"); }
else {
update_option("thumbnail_crop", "1");

// Medium Size Thumbnail
if(false === get_option("medium_crop")) {
add_option("medium_crop", "1"); }
else {
update_option("medium_crop", "1");

// Large Size Thumbnail
if(false === get_option("large_crop")) {
add_option("large_crop", "1"); }
else {
update_option("large_crop", "1");

Thanks to WP-Snippet for this handy tip!

Have a great weekend!

Free Video Why 100 is NOT a Perfect Google PageSpeed Score (*5 Min Watch) Learn how to use Google PageSpeed Insights to set realistic goals, improve site speed, and why aiming for a perfect 100 is the WRONG goal.