diff --git a/components/Image.tsx b/components/Image.tsx new file mode 100644 index 0000000..6aac864 --- /dev/null +++ b/components/Image.tsx @@ -0,0 +1,17 @@ +// THIS FIXES A BUG WITH NEXT IMAGE +// SEE: https://github.com/vercel/next.js/issues/33488 +// FIX: https://github.com/vercel/next.js/issues/33488#issuecomment-1879127189 + +import NextImage from "next/image"; + +const Image = ({...props }: any) => { + const imageLoader = ({src, width, quality}: any) => { + return `${src}?w=${width}&q=${quality || 75}` + } + + return ( + + ) + } + +export default Image; \ No newline at end of file diff --git a/components/KIND20Card.tsx b/components/KIND20Card.tsx index 6a68d89..13e9184 100644 --- a/components/KIND20Card.tsx +++ b/components/KIND20Card.tsx @@ -13,7 +13,7 @@ import Link from "next/link" import ViewCopyButton from "./ViewCopyButton" import type { Event as NostrEvent } from "nostr-tools" import ZapButton from "./ZapButton" -import Image from "next/image" +import Image from "@/components/Image" interface KIND20CardProps { pubkey: string diff --git a/components/QuickViewKind20NoteCard.tsx b/components/QuickViewKind20NoteCard.tsx index 292e409..bb3cd94 100644 --- a/components/QuickViewKind20NoteCard.tsx +++ b/components/QuickViewKind20NoteCard.tsx @@ -8,7 +8,7 @@ import { SmallCardContent, } from "@/components/ui/card" import Link from 'next/link'; -import Image from 'next/image'; +import Image from '@/components/Image'; import { extractDimensions } from '@/utils/utils'; interface QuickViewKind20NoteCardProps { @@ -40,7 +40,7 @@ const QuickViewKind20NoteCard: React.FC = ({ pubke