File tree Expand file tree Collapse file tree 7 files changed +9
-81
lines changed
app/code/Magento/Catalog/view/frontend
dev/tests/js/jasmine/tests/lib/mage/gallery Expand file tree Collapse file tree 7 files changed +9
-81
lines changed Original file line number Diff line number Diff line change 1010 <css src =" mage/gallery/gallery.css" />
1111 </head >
1212 <update handle =" catalog_product_opengraph" />
13- <update handle =" catalog_product_microdata" />
1413 <update handle =" page_calendar" />
1514 <body >
1615 <attribute name =" itemtype" value =" http://schema.org/Product" />
Original file line number Diff line number Diff line change @@ -32,10 +32,9 @@ $mainImageData = $mainImage ?
3232 <img
3333 alt="main product photo"
3434 class="gallery-placeholder__image"
35- itemprop="image"
3635 src="<?= /* @noEscape */ $ mainImageData ?> "
3736 />
38- <meta itemprop="image" content ="<?= /* @noEscape */ $ mainImageData ?> ">
37+ <link itemprop="image" href ="<?= /* @noEscape */ $ mainImageData ?> ">
3938</div>
4039
4140<script type="text/x-magento-init">
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -28,12 +28,11 @@ define([
2828 this . _super ( config , element ) ;
2929 $ ( element ) . one ( 'f:load' , function ( event ) {
3030 if ( $ ( event . target ) . hasClass ( 'fotorama__active' ) ) {
31- let metaImg = document . createElement ( 'meta ' ) ;
31+ let linkImg = document . createElement ( 'link ' ) ;
3232
33- $ ( metaImg ) . attr ( 'itemprop' , 'image' ) ;
34- $ ( metaImg ) . attr ( 'content' , $ ( event . target ) . find ( 'img' ) . attr ( 'src' ) ) ;
35- $ ( event . target ) . append ( metaImg ) ;
36- $ ( event . target ) . find ( 'img' ) . attr ( 'itemprop' , 'image' ) ;
33+ $ ( linkImg ) . attr ( 'itemprop' , 'image' ) ;
34+ $ ( linkImg ) . attr ( 'href' , $ ( event . target ) . find ( 'img' ) . attr ( 'src' ) ) ;
35+ $ ( event . target ) . append ( linkImg ) ;
3736 }
3837 } ) ;
3938 }
Original file line number Diff line number Diff line change @@ -57,9 +57,9 @@ define([
5757 position : '1' ,
5858 type : 'image' ,
5959 videoUrl : null ,
60- thumb : 'http://test.domain/thumb-image.jpeg ' ,
61- full : 'http://test.domain/full-image.jpeg ' ,
62- img : 'http://test.domain/image.jpeg '
60+ thumb : '' ,
61+ full : '' ,
62+ img : ''
6363 }
6464 ] ,
6565 magnifierOpts : {
@@ -78,7 +78,7 @@ define([
7878 } ;
7979 element = $ ( '<div class="gallery-placeholder' +
8080 ' _block-content-loading" data-gallery-role="gallery-placeholder">' +
81- '<img alt="main product photo" class="gallery-placeholder__image" itemprop="image" src="">' +
81+ '<img alt="main product photo" class="gallery-placeholder__image" src="">' +
8282 '</div>' ) ;
8383 } ) ;
8484
@@ -101,7 +101,6 @@ define([
101101 expect ( gallery . settings . api ) . toBeDefined ( ) ;
102102 expect ( gallery . settings . activeBreakpoint ) . toEqual ( { } ) ;
103103 expect ( gallery . config . options . height ) . toEqual ( element . height ( ) ) ;
104- expect ( gallery . settings . $elementF . find ( 'img[itemprop]' ) ) . toBeDefined ( ) ;
105104
106105 $ . fn . data = originSpy ;
107106 } ) ;
Original file line number Diff line number Diff line change @@ -314,10 +314,6 @@ define([
314314 $fotoramaElement . fotorama ( config ) ;
315315 $fotoramaElement . find ( '.fotorama__stage__frame.fotorama__active' )
316316 . one ( 'f:load' , function ( ) {
317- // Mark itemprop on main image
318- $fotoramaElement
319- . find ( '.fotorama__stage__frame.fotorama__active img' )
320- . attr ( 'itemprop' , 'image' ) ;
321317 // Remove placeholder when main gallery image loads.
322318 $element . find ( '.gallery-placeholder__image' ) . remove ( ) ;
323319 $element
You can’t perform that action at this time.
0 commit comments