Invalid JSON response & “The server cannot process the image” errors
-
Hi, team. I’m running into a really confounding issue that I’ve not yet been able to resolve (though I’ve come close). I’ve followed every workflow I could find on the www.ads-software.com Forums and elsewhere that referenced the errors I’m seeing, but with very mixed results. I’m hoping the brain trust here can assist me in sorting out the problem, as it’s a bit of a blocker for our company’s content creation workflows.
Please let me know if I can provide any additional details, and thank you in advance for your time and consideration.
Issue
When attempting to upload some images for use in my WordPress pages and posts, I am intermittently met with one or more of the following error messages:
- “The server cannot process the image. This can happen if the server is busy or does not have enough resources to complete the task. Uploading a smaller image may help. Suggested maximum size is 2560 pixels.”
- “The response is not a valid JSON response.”
Expected result
The image should successfully upload.
Actual result
The image does not successfully upload.
Details
When the issue occurs, the browser console shows 500 (Internal Server Error) failures that reference /wp-json/wp/v2/media, api-fetch.min.js, and local-scripts.php.
The problem does not always happen. It seems to be limited to image uploads in excess of ~107 KB.
I’ve attached to this post an example of an image that causes the problem (dock-scheduling-infographic.png, 137 KB) and an image that uploads without issue (dock-scheduling-infographic.gif, 107 KB).
I created both images. The only difference between them is the file size and type.
- The WordPress version is 6.6.2.
- It is running in LocalWP Version 9.1.0+6719 since we edit locally and then self-host a static export of the finished instance.
- The LocalWP web server type is Apache.
- The PHP version is 7.4.3.0.
Troubleshooting attempted
I have attempted the following troubleshooting steps. I’ve noted in parenthesis the outcome of each.
- Configured Media Settings > Image sizes > Medium size > Max Width and Max Height values to 1920 (issue persists)
- Configured Media Settings > Image sizes > Large size > Max Width and Max Height values to 3000 (issue persists)
- Changed the WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, and memory_limit values from 256M to 512M in our wp-config.php and php.ini.hbs files (issue persists)
- Temporarily added a FcgidMaxRequestLen 51200000 value to our modules.conf.hbs file (issue persists)
- Temporarily added php_value upload_max_filesize, post_max_size, and memory_limit values to our .htaccess file of 10M or greater (issue persists)
- Tried running the WordPress project against every PHP version in LocalWP from 7.4.30 up to 8.2.23 (issue persists)
- Disabled all WordPress plugins (issue persists)
- Reinstalled WordPress core via Dashboard > Updates > Re-install version X.X.X
- Changed the LocalWP web server type from Apache to nginx (this step actually “resolved” the problem, but it causes our Simply Static export plugin to spool forever when Generate static files is clicked, which then causes the WordPress admin console to bog down to the point of usability, preventing us from building the static snapshot we need for publication)
After each troubleshooting step, I restarted the LocalWP server to ensure that the site was initialized with the latest settings.
Conclusion
At this point, I’m not sure what else to attempt. I’m confident that a filesize setting is misconfigured somewhere (one that seems to be linked, in some way, to Apache), but I don’t know where the problem exists. Is this an issue with which you can assist? Once again, thank you for your time, consideration, and insight.
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.