Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    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?

    Thread Starter Marcello

    (@vocmarcello)

    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…. ??

    Plugin Author nosilver4u

    (@nosilver4u)

    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.

    Thread Starter Marcello

    (@vocmarcello)

    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

    Thread Starter Marcello

    (@vocmarcello)

    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 ??

    Thread Starter Marcello

    (@vocmarcello)

    but i need this function….

    Plugin Author nosilver4u

    (@nosilver4u)

    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.

    Plugin Author nosilver4u

    (@nosilver4u)

    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?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘not work when user upload image’ is closed to new replies.