Can anyone help, I am using a group field with an image, and it’s working great as code below, only it uses the large image as my background, i’d like to use the thumbnail size, but struggling to find any advice online on how to incorporate the size in this code.
<?php
// vars
$webdesign = get_field('web_design');
if( $webdesign ): ?>
<div class="web-design" style="background-image:url(<?php echo $webdesign['image']['url']; ?>);">
<div class="service-label"><?php echo $webdesign['title']; ?></div>
</div><?php endif; ?>
Many thanks in advance.
This is covered in the documentation https://www.advancedcustomfields.com/resources/image/ under Customized display (arrray). It would look something like this
echo $webdesign['image']['sizes']['thumbnail'];
Thanks John, I could not see that for looking. worked a treat.