swl1020
swl1020

Reputation: 823

Get all product images, including excluded images

I've been using getMediaGalleryImages, but I just realized that doesn't return excluded images. Is there another similar method that does?

Upvotes: 2

Views: 6854

Answers (3)

gSorry
gSorry

Reputation: 1274

If You use custom collection try to add this:

->addAttributeToSelect('*')

Upvotes: 1

wmdextensions
wmdextensions

Reputation: 31

A bit late, but others may want to try

$product->getMediaGallery('images')

for getting all images in an array, including the ones marked with 'exclude'.

Upvotes: 3

Oscprofessionals
Oscprofessionals

Reputation: 2174

$product = $this->getProduct();
$galleryData = $product->getData('media_gallery');

Something like above code will get all Media images for a product.

Upvotes: 3

Related Questions