pierrebalian
9/25/2017 - 5:42 PM

ACF Image Array Simple Output with Thumbnail Size

ACF Image Array Simple Output with Thumbnail Size

<?php
				// first, get the image object returned by ACF
				$banner_object = get_field('banner_background_image');
				// and the image size you want to return
				$banner_size = 'banner';
				// now, we'll exctract the image URL from $image_object
				$banner_url = $banner_object['sizes'][$banner_size];
				?>
				
				<!--then output the url of the thumb size as defined-->
				<img src="<?php echo $banner_url; ?>" />