Skip to main content
10 events
when toggle format what by license comment
May 15, 2018 at 19:09 comment added Keyur Patel write $imageurl[] = $this->_imageHelper->init($product, 'product_page_image_small')->getUrl(); instead of only $image variable.
May 14, 2018 at 13:17 vote accept shivashankar m
May 14, 2018 at 5:54 comment added shivashankar m i have created function like above but still iam getting only one image
May 14, 2018 at 5:54 comment added shivashankar m Hi, public function getImages(){ $categoryId = '218'; $category = $this->categoryFactory->create()->load($categoryId); foreach ($collection as $product){ $imageurl=$this->_imageHelper->init($product, 'product_page_image_small')->getUrl(); } return $imageurl; }
May 13, 2018 at 8:05 comment added Keyur Patel Don't forget to accept the answer if it is working for you. Thanks.
May 13, 2018 at 7:46 comment added shivashankar m thanks for your reply, I will check it and get back to you
May 13, 2018 at 7:37 comment added Keyur Patel create a function in block and load category and return image url using : $categoryId = 'yourcategoryid'; $category = $this->_categoryFactory->create()->load($categoryId); return $category->getImageUrl();
May 12, 2018 at 13:10 comment added shivashankar m iam getting only one category image of product
May 12, 2018 at 10:20 comment added shivashankar m Thanks for the answer, how to load the images of category in phtml file
May 12, 2018 at 9:15 history answered Keyur Patel CC BY-SA 4.0