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 10
10
<css src =" mage/gallery/gallery.css" />
11
11
</head >
12
12
<update handle =" catalog_product_opengraph" />
13
- <update handle =" catalog_product_microdata" />
14
13
<update handle =" page_calendar" />
15
14
<body >
16
15
<attribute name =" itemtype" value =" http://schema.org/Product" />
Original file line number Diff line number Diff line change @@ -32,10 +32,9 @@ $mainImageData = $mainImage ?
32
32
<img
33
33
alt="main product photo"
34
34
class="gallery-placeholder__image"
35
- itemprop="image"
36
35
src="<?= /* @noEscape */ $ mainImageData ?> "
37
36
/>
38
- <meta itemprop="image" content ="<?= /* @noEscape */ $ mainImageData ?> ">
37
+ <link itemprop="image" href ="<?= /* @noEscape */ $ mainImageData ?> ">
39
38
</div>
40
39
41
40
<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([
28
28
this . _super ( config , element ) ;
29
29
$ ( element ) . one ( 'f:load' , function ( event ) {
30
30
if ( $ ( event . target ) . hasClass ( 'fotorama__active' ) ) {
31
- let metaImg = document . createElement ( 'meta ' ) ;
31
+ let linkImg = document . createElement ( 'link ' ) ;
32
32
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 ) ;
37
36
}
38
37
} ) ;
39
38
}
Original file line number Diff line number Diff line change @@ -57,9 +57,9 @@ define([
57
57
position : '1' ,
58
58
type : 'image' ,
59
59
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 : ''
63
63
}
64
64
] ,
65
65
magnifierOpts : {
@@ -78,7 +78,7 @@ define([
78
78
} ;
79
79
element = $ ( '<div class="gallery-placeholder' +
80
80
' _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="">' +
82
82
'</div>' ) ;
83
83
} ) ;
84
84
@@ -101,7 +101,6 @@ define([
101
101
expect ( gallery . settings . api ) . toBeDefined ( ) ;
102
102
expect ( gallery . settings . activeBreakpoint ) . toEqual ( { } ) ;
103
103
expect ( gallery . config . options . height ) . toEqual ( element . height ( ) ) ;
104
- expect ( gallery . settings . $elementF . find ( 'img[itemprop]' ) ) . toBeDefined ( ) ;
105
104
106
105
$ . fn . data = originSpy ;
107
106
} ) ;
Original file line number Diff line number Diff line change @@ -314,10 +314,6 @@ 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' ) ;
321
317
// Remove placeholder when main gallery image loads.
322
318
$element . find ( '.gallery-placeholder__image' ) . remove ( ) ;
323
319
$element
You can’t perform that action at this time.
0 commit comments