---
title: "JPEGs"
description: "Learn how to generate JPEG images instead of PNG for Nuxt OG Image."
canonical_url: "https://nuxtseo.com/docs/og-image/v5/guides/jpegs"
last_updated: "2026-05-06T18:48:16.537Z"
---

The default image extension generated by Nuxt OG Image for Satori images is a `png`.

PNGs are great for most use cases, but they come at the cost of a larger file size.

You can opt-in we can render JPEGs instead of PNG but it requires Sharp. This is disabled
by default as Sharp is a heavy dependency and [compatibility](/docs/og-image/guides/compatibility) is limited.

If you're prerendering your images or using a Node based environment, you can enable Sharp to render JPEGs.

For Chromium rendering, `jpeg` images are rendered by default.

## Setup

To install Sharp, you need to install the `sharp` dependency:

<code-group>

```sh [pnpm]
pnpm i -D sharp
```

```bash [yarn]
yarn add -D sharp
```

```bash [npm]
npm install -D sharp
```

</code-group>

Now you can change your default extension to either `jpeg` or `jpg`.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  ogImage: {
    defaults: {
      extension: 'jpeg',
    }
  },
})
```
