• Hello,

    I have an error when cropping an image on my website; the message on the UI is “There was an error cropping your image”.

    Here is what I see in the logs:

    PHP Warning: file_put_contents(https://cdn.{domain}.com/wp-content/uploads/cropped-image.jpeg): Failed to open stream: HTTP wrapper does not support writeable connections in /home/{path}/public/wp-includes/class-wp-image-editor-imagick.php on line 860″ while reading response header from upstream, client: {ip}], server: {server}}.

    It looks like the cropping function tries to use the cdn url instead of a filename with :

    file_put_contents( $filename, $image->getImageBlob() ) 

    Which causes the error as file_put_contents expects a file path.

    How can this be addressed? The imagick usage is essential to my application.

    Thank you for your help!

  • The topic ‘Imagick crop fails with cdn url’ is closed to new replies.