• Our writers are uploading huge image files, I was wondering how to limit the max upload file size to say 500k for users that are not editors or admin.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Bump! I’d really love to know about this as well. Apparently WordPress MU has the ability to limit upload size for certain users/roles, and it’d be great to know if one could do the same for certain users/roles with a regular non-MU WordPress installation. Anyone?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    function max_up_size() {
    return 500*1024; // 500 k bytes
    }
    add_filter('upload_size_limit', 'max_up_size');

    Put it in a plugin or your theme’s functions.php.

    Alternatively, a better way is to set up your PHP settings to have a max_upload_size setting that is set to whatever you want it to be.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘limit size of uploads…’ is closed to new replies.