There has been an error cropping your image

I've searched quite a bit and every single article seems to suggest the same thing, which I've tried to no avail.

I've already tried installing php7.4-gd. it did not fix the issue.

I tried adding this snippet to my functions.php file:

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');
}

Neither of these have fixed my issue.

I'm running XAMPP on debian. I imagine it has something to do with permissions because it's linux and 99% of all linux issues end up being permissions.

I got php 7.4.13

Topic cropping Wordpress

Category Web


  • In some cases, the ImageMagick extension might not be installed or might be unreliable (old versions of ImageMagick can be buggy). If its okay then check the rest of points.

  • It's the GD Library not installed.If its installed you forget to restart server.

    sudo apt-get install php7.0-gd

Use this to stop Apache for it to make changes.

 sudo apachectl stop

Start Apache now and everything is fixed

. sudo apachectl start

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.