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

# Download Image

This function provides a download link for an image. Normally, you can't download images using public links, but this allows you to generate a downloadable link.

<Info>
  You should initialize [InitLummi](/authentication) before using this method.
</Info>

```typescript
import { DownloandImage } from 'lummi'
import { imageId } from '@/data'

const { data, success, message } = await DownloandImage({
    id: imageId
})
```

## Props

<ParamField param="query" path="id" type="string" required>
  The ID of the image to download.
</ParamField>

<ParamField path="effects" type="object">
  Filters for free images only if `true`. Includes both free and pro by
  default.
</ParamField>

<ParamField path="resolution" type="enum">
  `original` | `small` | `medium` | `large` | `xlarge` | `ultra`
</ParamField>

<ParamField path="format" type="enum" placeholder="original">
  `jpg` | `png`
</ParamField>

# Return Props

<ResponseField name="data" type="string | null">
  The downloand url of the image if success, otherwise `null`.
</ResponseField>

<ResponseField name="success" type="boolean">
  `true` if the request was successful, otherwise `false`.
</ResponseField>

<ResponseField name="message" type="string">
  A message describing the result of the request.
</ResponseField>

<ResponseField name="code" type="number">
  `200`, `400`, `401`, `403`, `404`, `500`.

  <Info>Read more about [status codes](/status-codes) and what they mean.</Info>
</ResponseField>
