diff --git a/pages/components/small/comic_image.tsx b/pages/components/small/comic_image.tsx index e3e7fba..178a4c3 100644 --- a/pages/components/small/comic_image.tsx +++ b/pages/components/small/comic_image.tsx @@ -3,7 +3,19 @@ import Image from 'next/image' import { PlaceholderImageBase64 } from './placeholder' -export default function ComicImage({ src, alt, className }: { src: string; alt: string; className?: string }) { +export default function ComicImage({ + src, + alt, + priority, + loading, + className, +}: { + src: string + alt: string + priority?: boolean + loading?: 'lazy' | 'eager' + className?: string +}) { const imageLoader = ({ src }: { src: string }) => { const url = 'https://www.maretol.xyz/cdn-cgi/image/#{option}/#{origin}' return url.replace('#{option}', 'format=auto').replace('#{origin}', src) @@ -15,7 +27,8 @@ export default function ComicImage({ src, alt, className }: { src: string; alt: src={src} width={500} height={1000} - priority + priority={priority} + loading={loading} alt={alt} className={className} placeholder={`data:image/png;base64,${PlaceholderImageBase64}`}