Home › Forums › Add-ons › Gallery Field › Control over Gallery Image Sizes › Reply To: Control over Gallery Image Sizes
Hi @mjkessel
Thanks for the link. It will be hard to replicate this functionality using the gallery field due to the lack of a ‘size’ field for each image.
However, it is possible to add another field group for all images (location rule = attachments) and you could add a ‘masonry_size’ select field.
Now in your gallery field, you can edit each image and specify the size.
Then in your template, just load in the selected size via this tutorial:
http://www.advancedcustomfields.com/resources/how-to/how-to-get-values-from-a-media-attachment/
The only limitation of this is that each image can only every have 1 size. So if you reuse the same image on 2 pages, they can’t use different sizes.
Your other option is to use the repeater field and add 2 sub fields (image, masonry_size)
Thanks
E
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.