File tree Expand file tree Collapse file tree 1 file changed +26
-9
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ import { getImage } from '../lib/image';
7
7
import { palette } from '../palette' ;
8
8
import { type ImageBlockElement } from '../types/content' ;
9
9
import { type RenderingTarget } from '../types/renderingTarget' ;
10
+ import { AppsLightboxImage } from './AppsLightboxImage.importable' ;
10
11
import { GalleryCaption } from './GalleryCaption' ;
12
+ import { Island } from './Island' ;
11
13
import { LightboxLink } from './LightboxLink' ;
12
14
import { Picture } from './Picture' ;
13
15
@@ -84,15 +86,30 @@ export const GalleryImage = ({
84
86
maxWidth : `calc(${ width / height } * 96vh)` ,
85
87
} }
86
88
>
87
- < Picture
88
- alt = { image . data . alt ?? '' }
89
- format = { format }
90
- role = { image . role }
91
- master = { asset . url }
92
- width = { width }
93
- height = { height }
94
- loading = "lazy"
95
- />
89
+ { renderingTarget === 'Apps' ? (
90
+ < Island priority = "critical" >
91
+ < AppsLightboxImage
92
+ elementId = { image . elementId }
93
+ role = { image . role }
94
+ format = { format }
95
+ master = { asset . url }
96
+ alt = { image . data . alt ?? '' }
97
+ width = { width }
98
+ height = { height }
99
+ loading = { 'lazy' }
100
+ />
101
+ </ Island >
102
+ ) : (
103
+ < Picture
104
+ alt = { image . data . alt ?? '' }
105
+ format = { format }
106
+ role = { image . role }
107
+ master = { asset . url }
108
+ width = { width }
109
+ height = { height }
110
+ loading = "lazy"
111
+ />
112
+ ) }
96
113
{ renderingTarget === 'Web' && ! isUndefined ( image . position ) && (
97
114
< LightboxLink
98
115
role = { image . role }
You can’t perform that action at this time.
0 commit comments