While I was writing a blog post a couple of days ago, I realized an error appeared, 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 what it looks like!

It was new even to 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 revolutionary and comes with plenty of features and Gutenberg block plugins are an ultimate add-on to the community. According to some folks, it’s a new WordPress Gutenberg error. Probably the REST API didn’t work while uploading the images. And others have other reasons, too.
But who can wait for the updates and bugs to be fixed?
The 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 into what is causing it. But that didn’t take me closer to the investigation.
Finally, I found two workarounds, both work 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.

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

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

Surprisingly, this step will let you insert the images successfully without any error. 🙂
However, it’s not a permanent solution, but a perfect workaround if you don’t want to stop your work until WordPress releases its next update or patch.
If you would like to have all the permanent image error solutions. The next method that will solve the error response is not a valid JSON response.
Method 2 – Avoid Error While Uploading the Images in WordPress
This is even simpler; all you need to do is install a plugin available on GitHub, and the error will be no more.
Step 1. Download the Default to GD plugin WordPress Plugin

Step 2. Install the plugin in your WordPress Site…
Step 3. You are all set, no changes required at all.
One of the workarounds will solve the issue of uploading an image.
Note: Well, if you have done all the above and it hasn’t solved the issue.
Hmm.. You have to ditch the Gutenberg editor at this point until it gets fixed by WordPress.
The only thing you could do is switch back to the classic editor plugin. Install, and the problem will be fixed.
Do you like the trick to upload your images?
I have tried the above method personally on my site, and both worked for me. I have now gotten rid of the response is not a valid JSON response error.
The plugin method will solve all the image error that happens while uploading a picture on your WordPress site.