feat: improve some error messages
All checks were successful
Deploy to SFTP Server / build (push) Successful in 4m6s

This commit is contained in:
Max Richter
2025-05-14 19:48:55 +02:00
parent c74b314b1e
commit b32ca7d65e
2 changed files with 4 additions and 6 deletions

View File

@@ -3,7 +3,7 @@ import type { ImageMetadata } from "astro";
import { Picture as AstroImage } from "astro:assets";
import { generateThumbHash, getExifData } from "@helpers/image";
interface Props {
src: ImageMetadata;
src: ImageMetadata & { fsPath?: string };
alt: string;
pictureClass?: string;
class?: string;
@@ -22,7 +22,7 @@ const {
maxWidth,
} = Astro.props;
let thumbhash = hash ? await generateThumbHash(image) : "";
let thumbhash = hash && image.fsPath ? await generateThumbHash(image) : "";
let exif = await getExifData(image);