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 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.