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.
You should initialize InitLummi before using this method.
import { DownloandImage } from 'lummi'
import { imageId } from '@/data'

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

Props

id
string
required
The ID of the image to download.
effects
object
Filters for free images only if true. Includes both free and pro by default.
resolution
enum
original | small | medium | large | xlarge | ultra
format
enum
jpg | png

Return Props

data
string | null
The downloand url of the image if success, otherwise null.
success
boolean
true if the request was successful, otherwise false.
message
string
A message describing the result of the request.
code
number
200, 400, 401, 403, 404, 500.
Read more about status codes and what they mean.