I am trying to get the image label of a custom product image attribute, i have added options but i am unable to get the label for each type.

enter image description here

The code i am using to pull the labels is

<img src="<?php echo $this->helper('catalog/image')->init($_item, 'bundle_image_1')->resize(100) ?>" alt="<?php echo $this->getImageLabel($_item, 'bundle_image_1') ?>" class="float-left" />

<h4><?php echo $this->getImageLabel($_item, 'bundle_image_1') ?></h4>

1 Answer 1


Working code,try with this

    $customimg = $product->getMediaGalleryImages()->getItemByColumnValue('file',$product->getData('bundle_image_1'));
        echo $customimg->getLabel(); 
  • welcome..... :) Commented Jan 4, 2018 at 6:02

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.