1

When I try to crop an image in the WordPress backend area of my custom theme, I get the message "There has been an error cropping your image". I have it set up on a local machine using XAMPP. When I set up the exact same theme on a server, it works perfectly fine.

I checked quite some questions that seemed to be similar to my problem, but nothing worked so far.

I disabled all plugins. I checked the php.ini for extension=php_gd2.dll, which is not uncommented. I don't know what else could be the problem.

Interestingly when I change the theme to "Twenty Eleven" cropping images works.

2
  • Your theme might be forcing WordPress to use a specific image library to crop the images which is not supported, you might want to look that one up.
    – Johansson
    Aug 24, 2017 at 17:46
  • In addition to the Jack Johansson comment, possible your theme tries to write to not writable folder. And on the server this folder is writable for some reason Aug 24, 2017 at 17:50

1 Answer 1

3

For the record since I ended up here when experiencing the same issue on my localhost:

  1. In php.ini, Uncomment the line with: extension=php_gd2.dll
  2. Restart apache / all services

This sorted it out for me (I may have switched a few other services on while I was there, but I believe this is what fixed it!)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.