Skip to content

Large images result in 413 Request Entity Too Large #683

@amura11

Description

@amura11

I'm running into a frustrating issue where if I try to upload large images (seems to be anything > 1MB) that should be allowed, ie. they are less than the max file upload limit, I get an error. The error reported in Wordpress is:
Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels.

Looking at the network request in dev tools I get:
413 Request Entity Too Large

The image I'm uploading is less than 2500 pixels, it's under the upload file size I've set in my php.ini (the image is 3MB and the limit is 128MB), and the request fails in about 2 seconds which is under the processing limit I've set.

What I've Tried

  • Setting the Apache directive LimitRequestBody to 0 and it's maximum value in my .htaccess file
  • Increasing the post_max_size and upload_max_filesize
  • Increasing the memory_limit

I'm at a loss as to why this is happening. To me, it looks like some Apache configuration issue but from my limited knowledge I haven't been able to figure out where the issue is. I've posted my php.ini file below and I can post any other configuration files that might help.

php.ini

max_execution_time = 180
memory_limit = 1024M
post_max_size = 128M
upload_max_filesize = 128M
max_input_time = 180
file_uploads = On
safe_mode = Off

Upload Limit Displaying Correctly
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions