• Hi,

    I found that, the only way I could delete original images is deleting them in Media Library. How can we delete them automatically after got cropped images (I don’t want high size original images).

    Br,

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Giang Le

    (@gianghl1983)

    Hi,

    Do you guy have any solution for my problem?

    Br,

    • This reply was modified 4 years, 6 months ago by Giang Le.
    Plugin Author joppuyo

    (@joppuyo)

    Hey,

    Unfortunately, this use case is not supported right now. The plugin depends on the original image being available so the image may be re-cropped later.

    Plugin Author joppuyo

    (@joppuyo)

    Hey,

    Now that I look at the code it seems like creating a crop and deleting the original image manually by hand is not handled very gracefully. The re-crop button is shown but clicking it does not do anything since the AJAX request that fetches details from the original image fails.

    I think I will have to check how to handle this case. When it’s handled, I think it wouldn’t be too hard to add some sort of checkbox that does the deletion automatically after the crop is successful.

    Thread Starter Giang Le

    (@gianghl1983)

    @joppuyo Great! Thank you! For my sole purpose I allow users upload exact 150 * 150 px image and have no intention to use original one later on.

    Looking forward to your upgrades.

    Br,

    Interested by this feature too ??

    Thread Starter Giang Le

    (@gianghl1983)

    @joppuyo Do you have any update on that or guide me a little to delete programmatically after crop (hook…).

    Many thanks!

    Thread Starter Giang Le

    (@gianghl1983)

    Hey guys,

    Do we have any solution for this?

    Br,

    Thread Starter Giang Le

    (@gianghl1983)

    Found solution (drawback: we cannot crop again)

    Return array, then find ID of orignal image and delete

    $delete_ID = $image_arr['original_image']['ID'];
    wp_delete_attachment( $delete_ID, true );
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to delete original image after crop?’ is closed to new replies.