How are the users uploading images? Are they using some sort of special front-end uploader? Do their images end up in the Media Library after they upload them?
yes all normal
i have see, only if i give “manage_option” to subscriber they can upload image, and image resize,compress ecc
but without manage option, not work…. 🙁
EWWW should still be optimizing their uploads automatically, they just don’t have the ability to optimize images from the Media Library, or using the Bulk Optimizer.
I did a quick test with the Author role on my site (which does not have the manage_option capability), and it worked as expected. There are filters that let you adjust the permissions levels required for various things, let me know if you need information on those.
optimizazion work
resize not work
with default theme plugin work very good
but with my theme (i have buy) when my user (subscriber) upload image, this not resize
i have set:
Resize Other Images
Resizes images uploaded indirectly to the Media Library, like theme images or front-end uploads.
but with my user not work
resize work only if i set manage_option to my user, but i can’t leave so
if i remove this function in my function.php
function classifieds_mime_types($mimes){
$mimes[‘svg’] = ‘image/svg+xml’;
if( !current_user_can( ‘manage_options’ ) ){
$mimes = array(
‘jpg’ => ‘image/jpg’,
‘jpeg’ => ‘image/jpeg’,
‘gif’ => ‘image/gif’,
‘png’ => ‘image/png’,
);
}
return $mimes;
}
add_filter(‘upload_mimes’, ‘classifieds_mime_types’);
your plugin work PERFECT!! with all user
but i not have understand why 😀
but i need this function….
That’s very strange, I have some ideas, but won’t have time to test them until next week. I’ve got family in town, and Monday is a holiday, so I’ll try to dig into it again on Tuesday.
You said you’re using the ‘subscriber’ role for your users, but that role does not normally have the ability to upload images at all. What additional privileges/capabilities have you assigned to the role you are testing with (if you like, you can send them to me via https://ewww.io/contact-us/ )?
The filter that you mentioned appears to add the svg mime-type for admin users, and limit anyone else to only uploading JPG/PNG/GIF, does that sound right?