Title: Crops not saving?
Last modified: August 22, 2016

---

# Crops not saving?

 *  [npacademy](https://wordpress.org/support/users/npacademy/)
 * (@npacademy)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/crops-not-saving/)
 * It tells me they have cropped successfully, but when I return to the crop section,
   they’ve reset?
 * [https://wordpress.org/plugins/manual-image-crop/](https://wordpress.org/plugins/manual-image-crop/)

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/crops-not-saving/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/crops-not-saving/page/2/?output_format=md)

 *  Plugin Author [Tomasz Sita](https://wordpress.org/support/users/tomaszsita/)
 * (@tomaszsita)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233622)
 * Please try v1.08 It should have more descriptive error messages.
 *  [virilagalaus](https://wordpress.org/support/users/virilagalaus/)
 * (@virilagalaus)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233662)
 * I am having the same problem. It says it has been cropped successfully, without
   any error message, then it goes back to the image with no changes what so ever.
   Using version 1.08.
 *  [Surykat](https://wordpress.org/support/users/surykat/)
 * (@surykat)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233664)
 * Same here. Does anyone have any idea what could causing the problem? Version 
   1.08, WordPress 4.0.1.
 *  [Alisa R. Herr](https://wordpress.org/support/users/isabisa/)
 * (@isabisa)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233665)
 * I’m having this same issue but only on my production site on WPEngine. It works
   fine on localhost and on the staging site on WPEngine.
 * There are no error messages, it just says “The image has been cropped successfully”
   but the saved image hasn’t changed.
 *  [Alisa R. Herr](https://wordpress.org/support/users/isabisa/)
 * (@isabisa)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233666)
 * [@tomaszsita](https://wordpress.org/support/users/tomaszsita/), I think this 
   will help:
 * I found the problem. It is when the admin area is SSL.
 * In the cropImage() function in lib/ManualImageCrop.php:
 * $uploadsDir[‘baseurl’] is changed to https via the preg_replace, but wp_get_attachment_image_src
   returns http, not https for the $src_file_url and $dst_file_url. So the str_replace
   functions on lines 165 and 171 are not working, and thus not returning file paths
   as expected.
 * There is probably a more elegant way to do this but, I added the following lines
   as a temporary fix:
 * On line 163:
 *     ```
       if (is_ssl()) {
         $src_file_url = preg_replace('#^http://#i', 'https://', $src_file_url);
       }
       ```
   
 * On line 171:
 *     ```
       if (is_ssl()) {
         $dst_file_url = preg_replace('#^http://#i', 'https://', $dst_file_url);
       }
       ```
   
 *  [Alisa R. Herr](https://wordpress.org/support/users/isabisa/)
 * (@isabisa)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233667)
 * So the new chunk of code looks like this:
 *     ```
       if (is_ssl()) {
         $uploadsDir['baseurl'] = preg_replace('#^http://#i', 'https://', $uploadsDir['baseurl']);
       }
   
       $src_file_url = wp_get_attachment_image_src($_POST['attachmentId'], 'full');
   
       if (!$src_file_url) {
         echo json_encode (array('status' => 'error', 'message' => 'wrong attachment' ) );
         exit;
       }
   
       if (is_ssl()) {
         $src_file_url = preg_replace('#^http://#i', 'https://', $src_file_url);
       }
   
       $src_file = str_replace($uploadsDir['baseurl'], $uploadsDir['basedir'], $src_file_url[0]);
   
       $dst_file_url = wp_get_attachment_image_src($_POST['attachmentId'], $_POST['editedSize']);
   
       if (!$dst_file_url) {
         exit;
       }
   
       if (is_ssl()) {
         $dst_file_url = preg_replace('#^http://#i', 'https://', $dst_file_url);
       }
   
       $dst_file = str_replace($uploadsDir['baseurl'], $uploadsDir['basedir'], $dst_file_url[0]);
       ```
   
 *  [Matt](https://wordpress.org/support/users/syntax53/)
 * (@syntax53)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233668)
 * Thanks for figuring that out. Worked for me too.
 *  [treighton](https://wordpress.org/support/users/treighton/)
 * (@treighton)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233671)
 * I tried that fix, even though im not on SSL, and im still having the same issue.
 *  [inthedistance](https://wordpress.org/support/users/inthedistance/)
 * (@inthedistance)
 * [11 years ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233672)
 * It’s not working for me, either and I’m not using SSL (WP 4.1.2). The crop dimensions
   aren’t correct and the location of the crop isn’t what I selected. This makes
   for bad news on a photo portfolio website. Seems like this issue is unresolved
   for many going back some time. Hope to see it fixed soon.
 *  Plugin Author [Tomasz Sita](https://wordpress.org/support/users/tomaszsita/)
 * (@tomaszsita)
 * [11 years ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233673)
 * Hello,
 * can you please test 1.09, errors handling has been improved so hopefully we will
   get more info if something still won’t be working correctly.
 *  [gunn88](https://wordpress.org/support/users/gunn88/)
 * (@gunn88)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233674)
 * It didnt,t work for me. Neither v1.09 nor v1.10…
 *  Plugin Author [Tomasz Sita](https://wordpress.org/support/users/tomaszsita/)
 * (@tomaszsita)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233675)
 * Hi guys,
    would you allow me to have a look at your set-ups? Please pop me an
   email at [tomasz.sita@gmail.com](https://wordpress.org/support/topic/crops-not-saving/tomasz.sita@gmail.com?output_format=md)
 *  [kaizer01](https://wordpress.org/support/users/kaizer01/)
 * (@kaizer01)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233682)
 * not working anymore.
    using wp 4.2.4
 *  [musichappens](https://wordpress.org/support/users/musichappens/)
 * (@musichappens)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233684)
 * Afternoon —
 * I’m experiencing the same issue with the plugin as the others mentioned. I can
   go through all of the steps to crop an image, and see the confirmation that the
   image was cropped, but have nothing change with the image itself.
 * Any information on this would be greatly appreciated! This plugin could be incredibly
   helpful on my site.
 * Just in case, my site is [http://www.mistudents.org](http://www.mistudents.org)
 *  [jetlej](https://wordpress.org/support/users/jetlej/)
 * (@jetlej)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/crops-not-saving/#post-5233685)
 * I’m seeing the same issue. It’s not saved

Viewing 15 replies - 1 through 15 (of 20 total)

1 [2](https://wordpress.org/support/topic/crops-not-saving/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/crops-not-saving/page/2/?output_format=md)

The topic ‘Crops not saving?’ is closed to new replies.

 * ![](https://ps.w.org/manual-image-crop/assets/icon-256x256.png?rev=3348923)
 * [Manual Image Crop](https://wordpress.org/plugins/manual-image-crop/)
 * [Support Threads](https://wordpress.org/support/plugin/manual-image-crop/)
 * [Active Topics](https://wordpress.org/support/plugin/manual-image-crop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/manual-image-crop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/manual-image-crop/reviews/)

 * 20 replies
 * 13 participants
 * Last reply from: [Tomasz Sita](https://wordpress.org/support/users/tomaszsita/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/crops-not-saving/page/2/#post-5233690)
 * Status: not resolved