next-js-image.tsx

src/components/lightbox/next-js-image.tsx
// import Image from 'next/image'
import {
isImageFitCover,
isImageSlide,
useLightboxProps,
} from 'yet-another-react-lightbox'
function isNextJsImage(slide: any) {
return (
isImageSlide(slide) &&
typeof slide.width === 'number' &&
typeof slide.height === 'number'
)
}
export function NextJsThumbnail({ slide, rect }: any) {
const { imageFit } = useLightboxProps().carousel
const cover = isImageSlide(slide) && isImageFitCover(slide, imageFit)
if (!isNextJsImage(slide)) return undefined

Showing the first 20 lines.

Get full code

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC