Fix issue that thumbnails were not used
Build and publish docker image snapshot / build-and-publish (push) Successful in 1m2s
Details
Build and publish docker image snapshot / build-and-publish (push) Successful in 1m2s
Details
This commit is contained in:
parent
77363a5371
commit
4794f4e62b
|
|
@ -13,7 +13,7 @@ export interface PhotoWithFolder extends ImageWithThumbnail {
|
||||||
const PreviewFolder = ({ folder }: { folder: FolderPreview }) => {
|
const PreviewFolder = ({ folder }: { folder: FolderPreview }) => {
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
src={folder.imagePreview.src}
|
src={folder.imagePreview.thumbnail}
|
||||||
alt={folder.name}
|
alt={folder.name}
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
style={{
|
style={{
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@ export const ImageGallery = ({ images }: { images: ImageWithThumbnail[] }) => {
|
||||||
<>
|
<>
|
||||||
<MasonryPhotoAlbum
|
<MasonryPhotoAlbum
|
||||||
photos={images}
|
photos={images}
|
||||||
componentsProps={{
|
render={{
|
||||||
image: {
|
image: (props, context) => (
|
||||||
loading: "lazy",
|
<img {...props} src={context.photo.thumbnail} loading={"lazy"} />
|
||||||
},
|
),
|
||||||
}}
|
}}
|
||||||
onClick={({ index }) => setIndex(index)}
|
onClick={({ index }) => setIndex(index)}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue