Wordpress 5.6 image upload error: not a valid JSON response – Kev's Development...
source link: https://www.kevinhooke.com/2020/12/23/wordpress-5-6-image-upload-error-not-a-valid-json-response/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
WordPress 5.6 image upload error: not a valid JSON response
For larger image file uploads I’ve been getting this error recently:
Reducing the image file size and then retrying avoids the issue, but this adds additional steps.
Multiple posts online like this one suggest this is an error with the permalinks and resaving the current settings on that page in the Admin panel will fix the error, but this didn’t fix it for me.
Looking around in my server logs, I found this error in my /var/log/nginx/error.log:
2020/12/23 00:36:45 [error] 36#36: *311 client intended to send too large body: 4132609 bytes
This post suggests adding a client_max_body_size param in nginx.conf (or increasing the value already there). I added a larger value than the size in the error and this fixed the issue.
CategoriesKev's BlogTagshosting, nginx, wordpress
Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Comment
Name *
Email *
Website
Save my name, email, and website in this browser for the next time I comment.
Notify me of follow-up comments by email.
Notify me of new posts by email.
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Post navigation
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK