I am setting the header image in WordPress and when I click on the crop
button, it shows me the following error:
There has been an error cropping your image.
I am setting the header image in WordPress and when I click on the crop
button, it shows me the following error:
There has been an error cropping your image.
There is too little information to be completely sure, but usually this error occurs when WordPress cannot find the graphic library which should be installed on your server. So you should check with your provider to see if Imagick and/or GD are installed.
You can also add this little snippet of code in your functions.php
file to make sure WordPress looks for both (often it only looks for Imagick):
add_filter ('wp_image_editors', 'wpse303391_change_graphic_editor');
function wpse303391_change_graphic_editor ($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
}
This snippet will look for GD first and then for Imagick. The latter gives better quality, but uses more memory, which can also lead to server errors.