WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Upload max size – header and media

[Resolved] Upload max size – header and media

  • My max upload is set to 2M. For an image file for a plugin I wrote myself that is indeed the limit. For the header image, however, it’s 1.5M. And for any attachments to posts it’s a mere 1M. Is there anything defined in WordPress? I checked my php.ini file and it’s indeed set to 2M. If I echo phpinfo() everything says 2M. What could be going on?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Ok, so I figured out where to change the allowed header image size (via network settings as a superadmin). My media files are still limited to 1M, though. 🙁

    Finally found the problem! In wp-admin/includes/media.php, the variable $upload_size_unit is set. It converts bytes to megabytes and then converts it to an integer. Well, 2048000 bytes = 1.953125 MB. This value is then converted to an integer… doing so Rounds. It. Down. To. 1MB.

    So heads up to anyone with the same problem!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Upload max size – header and media’ is closed to new replies.
Skip to toolbar