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';
77import { palette } from '../palette' ;
88import { type ImageBlockElement } from '../types/content' ;
99import { type RenderingTarget } from '../types/renderingTarget' ;
10+ import { AppsLightboxImage } from './AppsLightboxImage.importable' ;
1011import { GalleryCaption } from './GalleryCaption' ;
12+ import { Island } from './Island' ;
1113import { LightboxLink } from './LightboxLink' ;
1214import { Picture } from './Picture' ;
1315
@@ -84,15 +86,30 @@ export const GalleryImage = ({
8486 maxWidth : `calc(${ width / height } * 96vh)` ,
8587 } }
8688 >
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+ ) }
96113 { renderingTarget === 'Web' && ! isUndefined ( image . position ) && (
97114 < LightboxLink
98115 role = { image . role }
You can’t perform that action at this time.
0 commit comments