Maybe this isn’t an ACF specific question, but is it possible to filter the images displayed in the Image Uploader?
The only options are “All” and “Uploaded to post”. I want to filter only images uploaded by the user. So that the user can only use/access images they have previously uploaded.
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.
I was looking into another question and did some testing, this may also be of interest to you. https://support.advancedcustomfields.com/forums/topic/filter-gallery-items/