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.