Fix lazy loading (Firefox)
see https://bugzilla.mozilla.org/show_bug.cgi?id=1647077 `loading` attribute needs to be before `src` attribute
This commit is contained in:
parent
18661afbc9
commit
4da3376d5f
|
|
@ -13,9 +13,9 @@ export interface PhotoWithFolder extends ImageWithThumbnail {
|
|||
const PreviewFolder = ({ folder }: { folder: FolderPreview }) => {
|
||||
return (
|
||||
<img
|
||||
loading="lazy"
|
||||
src={folder.imagePreview.thumbnail}
|
||||
alt={folder.name}
|
||||
loading="lazy"
|
||||
style={{
|
||||
objectFit: "cover",
|
||||
width: "100%",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export const ImageGallery = ({ images }: { images: ImageWithThumbnail[] }) => {
|
|||
photos={images}
|
||||
render={{
|
||||
image: (props, context) => (
|
||||
<img {...props} src={context.photo.thumbnail} loading={"lazy"} />
|
||||
<img loading={"lazy"} {...props} src={context.photo.thumbnail} />
|
||||
),
|
||||
}}
|
||||
onClick={({ index }) => setIndex(index)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue