I'm trying to pull through the gallery images on the product page as I'm re doing the gallery. The code I'm using is:
<?php $_product = $block->getProduct(); ?> <?php $gallery = $_product->getMediaGalleryImages(); ?> <?php foreach ($gallery as $galleries): ?> <figure><?php echo $galleries ?></figure> <?php endforeach; ?>
But this throughs back an error of "Object can't be converted to string"
Any ideas on how to fix this?