0

Hmm, been doing WP development for a good long time, but this is a new problem I've just encountered and don't know the next step to track it down. The symptoms feel related but may not be. They are:

  1. I can upload images from Media>Add New - though it appears to get stuck on "Crunching" despite adding to media library
  2. If I attempt to upload an image through Gutenberg block>Select Image>Media Library>drag-and-drop or Gutenberg block>Select Image>Media Library>Upload Image, the image progress bar goes all the way across, waits several seconds, and then I get a message "An error occurred in the upload. Please try again later."
  3. If I attempt to drag an image into a Gutenberg block or use Upload/Select, the image appears for a second and then disappears and a message says "The response is not a valid JSON response." Interestingly, it looks like the image is added to the media library anyway.
  4. If I attempt to add an image to a CPT or to a Gutenberg Image block, using Select Image>Media Library the loading symbol spins and spins and no images display.
  5. A CF7 form that was recently successfully allowing non-members to upload images, giving them a confirmation message afterward, now uploads the image but gets stuck on the spinning loading symbol.

No major changes or plugins were added since this problem developed. Though I know how little things can cascade into bigger problems.

Naturally, I've searched on all of these problems and not been able to conclusively see a common thread. I've searched the logs but nothing jumped out at me.

This is a production website, so disabling all the plugins and other such Draconian suggestions, are not easy without cloning the website to a safe place.

Here's the site: https://unavoidabledisaster.com

Any suggestions you may have may be helpful.

EDIT 1: Image sizes are set correctly in settings. After an image upload, I see the properly resized images in my uploads directory.

5
  • The 'crunching' step will be using either GD or ImageMagick to generate the separate image sizes - you can see which, and related settings in Tools, Site Health, Info, Media Handling. Does that all look correct? Can you see anything related to GD or ImageMagick in your logs? Can you watch the processes on your server during an upload to see what happens? Do you see the resized images correctly in wp-content/uploads? It may also be worth temporarily adding error_log() tracing to the class-wp-image-editor* file that you're using to see what's happening there too.
    – Rup
    Commented Aug 29, 2020 at 23:05
  • Would this account for the more troublesome problem of hanging while adding media to a post?
    – Wes Modes
    Commented Sep 1, 2020 at 0:42
  • I'd guess it's all the same thing, but I don't know which of these are blocking and which are run in the background, no.
    – Rup
    Commented Sep 1, 2020 at 0:44
  • Interestingly, Image sizes are set correctly in settings. After an image upload, I see the properly resized images in my uploads directory.
    – Wes Modes
    Commented Sep 1, 2020 at 0:47
  • Oh - I guess that's not what's causing the hanging then, sorry :-/ I'd see if you can find anything in the logs for cases 2 and 3, and in the 3 case you can also check the upload response in your browser's debug tools.
    – Rup
    Commented Sep 1, 2020 at 0:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.