0

I want to display my product image gallery in my custom widget. $images = $_item->getMediaGalleryImages(); is how I got my images for product.

I want to display the image using fotorama? is this possible, how can I do it?

1 Answer 1

0

So I finally figured it out:

Found this link Magento 2 + need to use fotorama in cms page

Load it to custom template phtml file

<?php echo $block->getLayout()
         ->createBlock('Magento\Framework\View\Element\Template')
         ->setTemplate('Magento_Theme::fotorama_slider.phtml')
         ->toHtml();
?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.