Home › Forums › ACF PRO › Cropped Image in inline styling? › Reply To: Cropped Image in inline styling?
No, when returning the url the_field() will only return the full size url.
In order to use a specific size you’ll need to do one of 2 things.
1) Return an image array and then use that image size
get_field() instead of
the_field() see the doc https://www.advancedcustomfields.com/resources/image/
2) Return an image ID and use https://developer.wordpress.org/reference/functions/wp_get_attachment_image_src/ and then output the url from that
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’re reaching out to our multilingual users to ask for help in translating ACF 6.1. Help make sure the latest features are available in your language here: https://t.co/TkEc2Exd6U— Advanced Custom Fields (@wp_acf) May 22, 2023
© 2023 Advanced Custom Fields.