> ## Documentation Index
> Fetch the complete documentation index at: https://dub.co/llms.txt
> Use this file to discover all available pages before exploring further.

# How to set custom link previews for your Dub links?

> Learn how to customize how your links show up on social media to improve click-through rates.

<Tip>
  This feature is only available on [Pro plans and
  above](https://dub.co/pricing).
</Tip>

Dub is the only link management platform that lets you customize the social media cards for your links, so you can have full control over how your links look when shared on social media and improve click-through rates.

## Why set custom link previews?

When running marketing campaigns, it's important to have a consistent brand voice across your links. However, that isn't always the case, especially when collaborating with external partners.

For example, your company was recently featured on TechCrunch, but the default link preview is a generic Unsplash image that doesn't accurately reflect your brand.

With Dub, you can set a custom-designed social media card for your link, which **greatly improves the click-through rate and performance of your short link**.

## How to set a custom link preview?

To leverage this feature, toggle the "Custom Link Previews" switch in the [link builder](/help/article/dub-link-builder). This will reveal the following fields:

1. **Image**: The image that will be used for the social media card. You can upload an image from your computer or drag and drop an image into the field (recommended size: 1200 x 630 pixels, max 1.5MB).
2. **Title**: The title that will be used for the social media card (max 120 characters).
3. **Description**: The description that will be used for the social media card (max 240 characters).

<Frame>
  <img src="https://assets.dub.co/help/custom-link-previews.png" alt="Create custom link previews for your links" />
</Frame>

You can also quickly access the **Link Preview** feature by using the keyboard shortcut `L` while in the link builder.

## Generating custom link previews using AI

You can also generate custom link previews for your links using AI simply by clicking on the `✨` button:

<Frame>
  <video src="https://assets.dub.co/help/generate-metatags-ai.mp4" loop autoPlay muted playsInline />
</Frame>

Behind the scenes, [Dub AI](https://dub.co/blog/introducing-dub-ai) leverages the latest Large Language Models (LLMs) to analyze the content of the link and generate a title and description that is SEO-friendly and increases the click-through rate.

## How do custom link previews look like?

When you share a Dub link that has a custom social media card, they will show up with the title, description, and image that you set on all social media platforms.

For example, this is a link that Taimur from Causal [shared on Twitter](https://x.com/taimurabdaal/status/1762516755153387886) when they launched their YC data dashboard project:

<Frame>
  <img src="https://assets.dub.co/help/causal-yc-tweet.png" alt="Causal's YC dashboard tweet" />
</Frame>

By leveraging Dub's custom link previews feature, they were able to set a custom title and preview image for their link, [go.causal.app/ycombinator](https://go.causal.app/ycombinator).

This resulted in a more engaging and informative tweet that effectively communicated the value of their product to a wider audience.

## Bonus: Add a custom video preview

Dub also supports the `og:video` [OpenGraph](https://ogp.me/) tag, which allows you to set a custom video preview for your links.

To set a custom video preview, you can pass a link to your video via the `video` attribute when [creating a link](/docs/api-reference/links/create) using our API:

```typescript title="create-link.ts" theme={null}
import { Dub } from "dub";

const dub = new Dub();

await dub.links.create({
  url: "https://example.com",
  proxy: true, // proxy has to enabled for custom link previews to work
  image: "https://example.com/image.png", // it's recommended to pass a fallback image for platforms that don't support og:video
  video: "https://example.com/video.mp4", // [!code highlight]
});
```

<Info>
  We currently do not support uploading custom video previews directly via the
  dashboard, but please [let us know](https://dub.co/contact/support) if that's
  something that you'd like to see.
</Info>

Here's a demo of how custom video previews works – let's embed a link ([https://dub.link/og-video](https://dub.link/og-video)) that has custom video preview enabled in Notion:

<Frame>
  <video src="https://assets.dub.co/help/custom-video-preview-demo.mp4" loop autoPlay muted playsInline />
</Frame>

As you can see, the link unfurled into a video preview when embedded in Notion, but if you clicked on the link, it would redirect you to the destination URL.

## Why are my custom link previews not working?

If your custom link previews are not working, it's usually due to a caching issue, where the social media platform cached the old version of your link.

You can use the following tools to bust the cache:

* **X**: [cards-dev.x.com/validator](https://cards-dev.x.com/validator)
* **LinkedIn**: [linkedin.com/post-inspector](https://www.linkedin.com/post-inspector)
* **Facebook**: [developers.facebook.com/tools/debug](https://developers.facebook.com/tools/debug)

If you're still having issues, please [let us know](https://dub.co/contact/support) and we'll be happy to help you out.
