There has been an error cropping your image - Polaroid images organised
There has been an error cropping your image - Photo by Soragrit Wongsa on Unsplash

There has been an error cropping your image

This article covers full detailed solution to the issue “There has been an error cropping your image” in PHP.

If you ever get an error while uploading and cropping an image on WordPress – Error like below

There has been an error cropping your image.

For this very blog when I was trying to upload an image to set it as a favicon I got this error

After searching for a while found out that it was because GD library for PHP which was not installed on the server

To find the GD Library package within CentOS repository

$ sudo yum list available | grep 'gd'
List of Packages having 'GD'  key-word under CentOS Repository
List of Packages having ‘GD’ key-word under CentOS Repository

Identify GD Library package name and install it

$ sudo yum install php-gd
GD library Dependencies Resolved
GD library Dependencies Resolved

Restart apache service

$ sudo service httpd restart

Thanks for reading.
Hope It was of some help to you.

Link to other useful articles

About the author

Rohan Kamble

A Web Developer by profession, who loves the web to the core with over 9 Years of Experience working on a wide range of domains like websites on e-commerce, Travel, Alumni, matrimonial, company's professional sites, Finance, company internal communications and many more. Also WordPress Plugins & Chrome extensions.

View all posts

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.