• 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.remarpro.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]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    To fix the issue, try to:
    – Disable the large image size check
    – Resize Your Image
    – Convert Your Image to Another Format
    – Increase Memory Limit
    – Change the PHP version
    – Check Server Resource Usage
    – If using it, disable Cloudflare Proxy

    Thread Starter mdesorcie

    (@mdesorcie)

    Hi, t-p – thank you for your input. Responding by the numbers:

    1. Where can I do this?
    2. Image dimensions do not impact this problem. Only the file size seems to matter.
    3. Image formats do not impact this problem. Only the file size seems to matter.
    4. Where can I do this?
    5. As mentioned previously, this was attempted without success.
    6. The WordPress installation is being run locally. There is no resource issue present.
    7. This step is inapplicable based on #6.
    • This reply was modified 1 week, 5 days ago by mdesorcie.
    Thread Starter mdesorcie

    (@mdesorcie)

    @t-p – just a quick update here – it looks like the threshold before the WordPress configuration starts refusing image uploads is ~120 KB. Can you tell me where (both in the UI and in the WordPress build files) such a limit might be getting enforced so I can check? To be absolutely clear, this does not appear to be an image size problem but a file size problem.

    Moderator t-p

    (@t-p)

    Thread Starter mdesorcie

    (@mdesorcie)

    Thank you, @t-p – results follow.

    Method 1: No change – the maximum file size already says it’s set to 300 MB

    Method 2: Applied

    Method 3: Applied

    Method 4: Unclear where in the “htaccess” file this code should go – can you advise?

    Method 5: Applied

    After applying what I could, it appears that the WordPress Admin panel is now accepting larger files. I appreciate the help! But, I want to understand how and where we should modify the htaccess file for future-proofing purposes. Can you assist with this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.