Link Preview Component
A component to display a link preview for URLs included in Lens posts, showing the title, description, and image.
Installation
Usage
The LinkPreview component is used to display a preview of a link. Because of CORS restrictions, the component requires a server to proxy the request. When installing this component a /url-meta API route is created.
This component requires Next.js
This component will install a Next.js API route to proxy the request, using App Router. If you are not using Next.js, you will need to create your own API route to proxy the request and edit the source accordingly.
import { LensLinkPreview } from "@/components/feed/link-preview";
<LinkPreview url="https://lens.xyz" />