Support

Account

Home Forums General Issues Upload Image Filter Reply To: Upload Image Filter

  • I don’t know if you can do this or not, but you should be able to.

    I have done something in the past that hides images from the media library. This file contains a a pre_get_posts that hides any file uploaded through the plugin from the media library. https://github.com/Hube2/blunt-gated-content/blob/master/admin/acf-upload-path.php.

    What you would need to do is create a pre_get_posts filter and
    1) See if the query is for attachments
    2) Get the currently logged in users
    3) Limit the query to attachments uploaded by the user… this is the part I’m not to sure about, I’ve never done this, but I think you just need to set the author argument to the user ID.