I have a product section on my wp-site. I am trying to display the attached thumbnail image in specific sizes that are automatically cropped to the right size.
I have used Advanced Custom Fields to create a field called product_thumbnail I have used Additional Image Sizes to create a new image size called products I have used the following code on another word press site and it worked fine, but on my current site it returns empty.
<?php $image = wp_get_attachment_image_src(get_field('product_thumbnail'), 'products'); ?>
<a href="<?php the_permalink(); ?>"><img src="<?php echo $image[0]; ?>" /></a>
I have ran a batch to make sure my images are created if not already. This is boggling my mind. Any help appreciated.