0

I was just wondering whats does src-dataX2 mean?

As i see it in core files (that i have duplicated) and when chaneg the code from

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')?>" data-srcX2="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize($imgX*2, $imgY*2) ?>" width="<?php echo $imgX; ?>" height="<?php echo $imgY; ?>" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" />

to

<img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')?>" width="<?php echo $imgX; ?>" height="<?php echo $imgY; ?>" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" />

I see no change in the image.

2

as you see in this search query: https://github.com/OpenMage/magento-mirror/search?utf8=%E2%9C%93&q=data-srcX2

this code does not exist in the original magento code, so your core got probably modified.

Besides this, the code should probably work together with some javascript to dynamically load images of some kind, maybe its about using double size for retina displays.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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