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
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
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?
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.
This topic has been closed to new replies.