feat: update image import in OG route to use Next.js Image component for improved performance and styling

This commit is contained in:
Bram Suurd
2024-10-10 22:00:52 +02:00
parent 3eceec9992
commit c1956d4d21

View File

@@ -1,5 +1,6 @@
import { pb } from "@/lib/pocketbase";
import { Script } from "@/lib/types";
import Image from "next/image";
import { ImageResponse } from "next/og";
import { NextRequest } from "next/server";
import { ClientResponseError } from "pocketbase";
@@ -34,7 +35,7 @@ export async function GET(req: NextRequest) {
alignItems: "center",
}}
>
<img
<Image
src={script.logo}
alt={title}
style={{