Open this example in the interactive library
Source code
// components/LinkedGalleryThumbnail.tsx
import Link from "next/link";
import Image from "next/image";
export default function LinkedGalleryThumbnail({
src = "/studio.jpg",
alt = "Inside the studio",
}: { src?: string; alt?: string } = {}) {
return (
<Link href="/gallery" aria-label="Open gallery">
<Image
src={src}
alt={alt}
width={240}
height={160}
style={{ objectFit: "cover", maxWidth: "100%" }}
/>
</Link>
);
}
