2 Fixes: Error – The Response is not a valid JSON Response

While I was writing a blog post a couple of days, I realized an error appears says, the response is not a valid JSON Response in WordPress while uploading images.

Generally, plenty of errors can be discovered while uploading images in WordPress.

This was pretty much weird. Here is how it looks like!

this is not a valid JSON response error

It was new for even me. I had explored a few forums about the same, and most of the folks are facing this in recent days.

Image Uploading Fails in Gutenberg Editor

Though Gutenberg is being revolutionary and comes with plenty of features and Gutenberg block plugins are an ultimate add ons to the community. According to some folks, it’s a new WordPress Gutenberg error. Probably REST API didn’t work while uploading the images. And others have other reasons too.

But, who can wait for the updates and bug to be fixed?

Question is How do I solve ‘the response is not a valid JSON response in WordPress’?

We need a solution. While troubleshooting this issue. I had to check for an internal issue, I installed a plugin Health Check to dig what is causing it. But, that didn’t take me closer to the investigation.

Finally, I found two work around, both works good and you can get rid of that error.

Fix 1 – The Response is not a valid JSON response

It’s pretty simple to get rid of this error, and upload your images successfully.

Step 1. Select Add Image from your Gutenberg block.

2 Fixes: Error - The Response is not a valid JSON Response 1

Step 2. Now, instead of clicking on upload traditionally for uploading an image, Select Media Library.

Select Media Library in WordPress

Step 3. From this window, switch to the tab Upload FilesSelect Files. And browse the image from your local drive.

Upload Files in WordPress

Surprisingly this step will let you insert the images successfully without any error. šŸ™‚

Though, it’s not a permanent solution but a perfect workaround if you don’t want to stop your work until WordPress releases their next update or patch.

If you would like to have all the permanent image error solution. The next method will solve the error response is not a valid JSON response.


Method 2 – Avoid Error While Uploading the Images in WordPress

This is even simple, all you need to do is install a plugin available in Github and the error will be no more.

Step 1. Download Default to GD plugin WordPress Plugin

Download default to GD plugin

Step 2. Install the plugin in your WordPress Site..

Step 3. You are all set no changes required at all.

Do you like the trick to upload your images?

I have tried this above method personally on my site, and both worked for me. I now got rid of the response is not a valid JSON response error.

In fact, the plugin method will solve all the image error happens while uploading a picture on your WordPress site.

14 thoughts on “2 Fixes: Error – The Response is not a valid JSON Response”

    • Really a nice tip.

      I don’t know if these solutions can help in my own case.

      I receive the “response is not a valid JSON response” error notice only when I update a post in draft and publish modes.

      I will try.

      Thank you

      Reply
  1. It seems to be a “Theme” problem using blocks, I removed my page image and left just TEXT and it still gives the same error when hitting “Publish” – no good, trying another theme!

    Reply
  2. Nothing here fixed anything. This was working perfectly apparently until I installed some updates. I switched browsers. Same result. Select or Upload Media is blank when Upload Files tab is selected in the one fix. The second fix made absolutely no difference at all.

    It worked perfectly. Then I installed updates faithfully. Then it broke. Was it untested?
    I’m running multi-site, multi-domain. And I cannot undo those and fold them out into single domain installations without an insane amount of work. Permissions on the directories involved did not change and appear to be correct as they were when things were working. The ONLY thing I can think of that changed is that I installed updates.

    Now I get the JSON message. When I try one method, it appears it will let me upload pictures. But when I do, it complains about the JSON error. When I try the alternate way, it just gives me a blank “Upload Files” page under the heading and menu. If I clip the Media Library tab, the pictures I uploaded from the past few years are all there in place. I just cannot upload files. I imagine I could upload them in Linux by hand. But things don’t work properly at all.

    Reply
  3. Hello NAVIN Bro
    Your article helped me a lot in fixing this JSON image adding error. I faced this problem several times. I ignored this, but today I googled it. And found your article. It is so simple to fix this problem as you have described.

    Thanks for this bro.

    Reply
  4. I was aI uploaded my file from Localhost to Online Server. I am not able to update any content type even I am not able to delete the sample page content. Is there anyone who can guide me and help with WP Plugin’s option.

    Reply
  5. I have just solved this issue, so I just want to share it here for the others. It took me 3 hours to bypass the “The Response is not a valid JSON Response” and finally upload an image.

    Solution:
    Download the classic editor plugin, and this problem will be solved automatically.
    https://wordpress.org/plugins/classic-editor/

    Then wait until WordPress solves this problem to switch back to block editor

    Reply

Leave a Comment

56 Shares
56 Shares
Copy link