We run a travel blog on a budget stack (joyofexploringtheworld.com) with Docker, Cloudflare, and imgproxy for images. When we hit “There has been an error cropping your image” in the WordPress media editor, the message pointed at the image—but the real cause was elsewhere.
The misleading error Link to heading
The error suggests missing image libraries (GD or Imagick). We confirmed both were installed and working. The actual problem: the crop request to admin-ajax.php was returning 403 Forbidden. That can come from a security plugin, WAF, or nonce validation—not from the image itself.
Check the real response Link to heading
Before assuming missing extensions, check server and plugin logs for the HTTP status of the crop request. A 403 means something is blocking the request before WordPress can process it. If you use a service that rewrites image URLs (e.g. imgproxy), make sure the crop flow in the admin still talks to your own server—exclude admin/AJAX from any URL rewrite so crop requests use local URLs.
// From imgproxy-rewrite.php — bypass admin, AJAX, and JSON requests
private static function should_bypass_request_context(): bool {
return is_admin() || wp_doing_ajax() || wp_is_json_request();
}
The MU-plugin checks should_bypass_request_context() before every rewrite. Admin pages, AJAX calls (including the crop request), and REST API calls all skip the rewrite entirely, so the crop flow uses local URLs.
What you can do Link to heading
- Check server and plugin logs for the crop request’s HTTP status.
- If it’s 403, look at security plugins, WAF rules, or nonce validation.
- If you use imgproxy or similar, exclude admin/AJAX from the rewrite.
- Verify GD or Imagick only if the request returns 200 and the error persists.
The full MU-plugin is in the companion repo.
See also: Running a WordPress Travel Blog on a Budget VPS: The Full Stack | Self-hosted image optimization with imgproxy
Built for a travel blog on a budget. This stack powers Joy of Exploring the World — curated travel itineraries, restaurant reviews, and destination guides. If you're planning your next trip, come explore with us.
All config files from this post are in the companion GitHub repo.