Seems like your site is served over HTTPS but the REST API is accessed over HTTP.
Could you check that under Settings -> General, WordPress Address (URL) and Site Address (URL) start with https:// ?
If not, change them from http:// to https:// and try if cropping works again.
Thread Starter
Guille
(@guillemartin)
I’ve just double checked and Site address is actually set as https://
Alright, thanks for checking the site URL.
Looking at the error message, it looks like the API endpoint is wrong, in addition to being HTTP instead of HTTPS, there is an extra trailing slash, it’s /wp-json/aiarc/v1/crop/ instead of /wp-json/aiarc/v1/crop .
Do you have some sort of trailing slash redirection in Apache/nginx configuration or .htaccess? In that case, it should be done in a way that does not affect the REST API.
Hi,
I’m getting the same “Failed to Crop” message when attempting to crop an image in wp-admin.
I also get the following console error on page load:
Failed to load resource: the server responded with a status of 500 (Internal Server Error) /***/wp-json/wp/v2/:1
After clicking the “Crop” button, I also get the following console error:
POST https://***/wp-json/aiarc/v1/crop 500 (Internal Server Error) xhr.js:184
I’m using the same versions as @guillemartin, but if I revert to version 4.1.4 of the plugin, I don’t get any errors and the crop works fine.
Thanks