File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
app/code/Magento/Catalog/view/frontend/templates/product/view Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ $mainImageData = $mainImage ?
32
32
<img
33
33
alt="main product photo"
34
34
class="gallery-placeholder__image"
35
+ itemprop="image"
35
36
src="<?= /* @noEscape */ $ mainImageData ?> "
36
37
/>
37
38
</div>
Original file line number Diff line number Diff line change @@ -314,6 +314,10 @@ define([
314
314
$fotoramaElement . fotorama ( config ) ;
315
315
$fotoramaElement . find ( '.fotorama__stage__frame.fotorama__active' )
316
316
. one ( 'f:load' , function ( ) {
317
+ // Mark itemprop on main image
318
+ $fotoramaElement
319
+ . find ( '.fotorama__stage__frame.fotorama__active img' )
320
+ . attr ( 'itemprop' , 'image' ) ;
317
321
// Remove placeholder when main gallery image loads.
318
322
$element . find ( '.gallery-placeholder__image' ) . remove ( ) ;
319
323
$element
You can’t perform that action at this time.
0 commit comments