Home Forums Add-ons Gallery Field Limit Gallery Field Images


Limit Gallery Field Images

  • Hi,

    I’m using the Add On Gallery Field on my site and was wondering if you can limit the images that come up in the media library to just the images that have been uploaded to that particular custom post?

    At the moment it’s brining in the images attached to the custom post plus it lists off all the other images below that sit in the current Media Library which is quite a lot.

    Let me know if that doesn’t makes sense.


  • Currently the image and file fields have an option for the lobrary to be restricted to ‘uploaded to’.

    This will soon be added to the gallery field.

    P.S. May I ask why you did not set this topic as a question, but as a post?
    It sounds like a question to me

  • O.K thanks for the update, will keep an eye out for that feature release.

    Not sure why it was posted as a ‘Post’ as I thought I ticked the question option as your right it’s definitely a questions.


  • Is there an easy way to make these changes? I can see the action acf/create_field reference that adds the “$field[‘library’]”. If you have a reference of what needs to be done… or if it’s allot more difficult, then do you have an ETA for this change.

    I have a live project, that I need a solution for. The new WP 3.5 media uploader, doesn’t seem to be accepting user capability limits the same way. So I’m hoping this can be a solution instead.

  • Hi @nuresponse

    It’s a bit more complicated than that. You will need to take a look at the js/input/image.js file to see how that ‘library’ data variable is used

  • Elliot,
    I appreciate the point in that direction. I see what you mean… it’s not that simple. I wish I was more experienced with js, I might be able to do this fix for you.

    It’s a shame that we have to use JS to make changes to the Media Uploader. I’m not sure why they made these changes to the WP 3.5 media uploader, but my old fixes where I could limit the media loop using user capabilities no longer work.

    Let me know if/when the gallery addon has this feature added, any ETA yet?

  • Hello,
    Are you planning also a feature to limit the number of pictures/files that a user can insert into a post ?


  • Hi @gpctarq

    Yes, I am planning some very BIG changes for the gallery field to bring it up to speed with user feedback.

    You will see an update some time over the next few months!


  • I hate to revive this thread but I have a site I need to take to production soon. If it helps anyone, in the meantime I used this plugin (github – Limit Upload) to limit the number of uploads which works for me as of WP 3.8.

    Now the issue for me is still enforcing the ‘Uploaded to this post’ selector in the media uploader. All the solutions I’ve found are javascript based and trigger after the uploader already starts loading the entire media library.

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Limit Gallery Field Images’ is closed to new replies.