diff --git a/src/components/BasicImage.astro b/src/components/BasicImage.astro
index a13c5a1..ef2eaba 100644
--- a/src/components/BasicImage.astro
+++ b/src/components/BasicImage.astro
@@ -2,6 +2,7 @@
import { Picture } from 'astro:assets';
import type { ImageMetadata } from 'astro';
import TextLink from './TextLink.astro';
+import Link from './Link.astro';
interface Props {
alt?: string;
@@ -9,6 +10,7 @@ interface Props {
class?: string;
decoding?: 'async' | 'sync' | 'auto';
height?: string | number;
+ href?: string;
loading?: 'lazy' | 'eager';
noSpacing?: boolean;
quality?: number;
@@ -25,6 +27,7 @@ const {
class: className,
decoding = 'async',
height,
+ href,
loading = 'lazy',
noSpacing,
quality,
@@ -60,6 +63,10 @@ if (src.startsWith('/images')) {
// Define sizes attribute for responsive images
const sizes = '(max-width: 440px) 100vw, (max-width: 768px) 90vw, (max-width: 1024px) 85vw, 1100px';
+
+// Determine the tag and specific attributes
+const ImageWrapper = href ? Link : 'div';
+const wrapperProps = href ? { href } : {};
---
)
}
-
+
{
(caption || source) && (