From 8b82bc82515ae79f3f59172a90398f0e88e2270b Mon Sep 17 00:00:00 2001 From: timonson Date: Sun, 20 Aug 2023 11:46:04 +0200 Subject: [PATCH] - --- og_image.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/og_image.ts b/og_image.ts index 05f6e68..7251b98 100644 --- a/og_image.ts +++ b/og_image.ts @@ -35,6 +35,7 @@ function drawBackground( } function isImageFormat(format: string): format is ImageFormat { + console.log(imageFormats, format); return imageFormats.includes(format as ImageFormat); } @@ -66,6 +67,7 @@ export async function createOgImage(request: Request): Promise { let imageWidth = parseInt(url.searchParams.get("width") || "0"); let imageHeight = parseInt(url.searchParams.get("height") || "0"); const imageFormat = parsedPathname.ext.slice(1); + console.log(parsedPathname, imageFormat, isImageFormat(imageFormat)); if (isImageFormat(imageFormat)) { if (theme === "light" || theme === "dark") { drawBackground(ctx, canvasSize, theme);