WordPress.org

Ready to get started?Download WordPress

Forums

Scissors - When cropping, error: 'Failed to save new image' pops up (11 posts)

  1. itsjordanbitch
    Member
    Posted 5 years ago #

    resizing images works fine, however cropping, once you've selected the area and click crop, comes up with a javascript popup saying 'Failed to save new image'.

    any idea what the issue is? this is the only plugin that does exactly what i need (thank you so much for that) but it would be lovely if the cropping worked :)

  2. stephanreiter
    Member
    Posted 5 years ago #

    Hmm, I've heard about that particular error message in the past. It seems that it's related to a lack of available memory to the script instance, which causes it to fail saving the compressed image. I've tried to counter this by increasing the memory limit using the following call: @ini_set('memory_limit', '256M');
    Unfortunately, this is not permitted on all hosts (fails silently without any effect), and so I'm a bit at a loss about what else could be done to fix this issue. Maybe someone else has an idea? I'd certainly appreciate it!

  3. itsjordanbitch
    Member
    Posted 5 years ago #

    ah damn that's a shame.
    any idea of any other plugins that could crop the image?
    scissors does the resizing just fine...
    i just can't find one that doesn't automatically crop it - i want to be able to select the area instead of it choosing some random part of the photo.

  4. vnomad
    Member
    Posted 5 years ago #

    Have the same error message here when cropping.
    However this error only happens when specifying the thumbnail or medium sized images, not when cropping the full size, or the "chain".

  5. Kaleb.G
    Member
    Posted 5 years ago #

    Hi Stephan,

    I have discovered one point of failure that causes this problem to occur.

    Let's say my thumbnail size is set to 150x150. When cropping an image, if the selection is smaller than 150x150 (142x142 for example), this "failed to save new image" error will arise. If I have the selection larger than 150x150 for the exact same image, it saves properly with no error.

    Do you have any code to support scaling up a selection smaller than the target thumbnail size?

  6. stephanreiter
    Member
    Posted 5 years ago #

    Wow, I've never thought about that. Thank you so much, that really makes sense! I'll try to fix the issue in the afternoon and release a new version of the plugin today or tomorrow.

    Thanks again,
    Stephan

  7. stephanreiter
    Member
    Posted 5 years ago #

    Update: The issue seems to be fixed in the latest development version. I'll test it some more and release it as version 0.96 tomorrow. If you encounter any problems with the new version, please post about them here. Thanks!

  8. jaynee
    Member
    Posted 5 years ago #

    Unlike Kaleb, I'm getting the error even though my selection is over 150x150. I've got a picture that I want to crop to 368x200 for the MEDIUM picture. However, I get the failure to save error. I do NOT get the error when saving thumbnails or new full dimensions. ONLY for medium.

    Looking forward to the fix!

  9. Kaleb.G
    Member
    Posted 5 years ago #

    Thank you for taking the time to implement the thumbnail fix, Stephan! I didn't mention it before, but this really is a great plugin. I should be testing out the new version over the next weeks or so.

    jaynee, what's your default size for medium pictures?

  10. stephanreiter
    Member
    Posted 5 years ago #

    You're welcome, Kaleb! And thanks for the kind works! :-)

    jaynee, I think the problem you're experiencing should also be fixed with the new version because it just sounds like Kaleb's issue with thumbnails, i.e. creating a picture through cropping whose dimensions are smaller than the default size for thumbnail/medium/...).

  11. Kaleb.G
    Member
    Posted 5 years ago #

    I've been testing this new version a lot and I haven't found any problems. Note that I only use this for thumbnails though.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags