feat: show recipe image on page
This commit is contained in:
@@ -15,6 +15,8 @@ export async function generateThumbHash(
|
||||
const imagePath = (image as ImageMetadata & { fsPath: string }).fsPath ??
|
||||
image.src;
|
||||
|
||||
if (!imagePath) return;
|
||||
|
||||
let sp;
|
||||
if (imagePath.startsWith("https://") || imagePath.startsWith("http://")) {
|
||||
const res = await fetch(imagePath);
|
||||
@@ -72,6 +74,8 @@ export async function getExifData(image: ImageMetadata) {
|
||||
const imagePath = (image as ImageMetadata & { fsPath: string }).fsPath ??
|
||||
image.src;
|
||||
|
||||
if (!imagePath) return undefined;
|
||||
|
||||
try {
|
||||
let buffer: ArrayBuffer;
|
||||
if (imagePath.startsWith("https://") || imagePath.startsWith("http://")) {
|
||||
|
||||
Reference in New Issue
Block a user