Image post-processing failure and Nginx client_max_body_size setting

If you encounter problems with processing failures after uploading images, the file size may be too large. If this is the case, try reducing the size of the image and uploading it again. In particular, images larger than 2500 pixels may cause problems.

Also, depending on your Nginx configuration, uploading large files may be restricted. This can be addressed by adjusting the ‘client_max_body_size’ directive in Nginx. This directive controls the maximum size of the request body from the client to the server.

/etc/nginx/conf.d/xxx.com.conf 
server { 
 client_max_body_size 1g; 
}

The above configuration sets the maximum size of the request body from the client to 1 gigabyte. As a reminder, this setting must be in a site-specific configuration file (‘xxx.com.conf’). It has no effect if it is described in a general configuration file (‘default.conf’).

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top