function downloadImage
downloadImage(filename: string): Promise<Uint8Array | null>

Download and decrypt an image from Bunny storage. Uses the storage SDK directly (same as upload/delete) instead of a CDN pull zone URL, which requires a separate pull zone linked to the storage zone. Returns the decrypted image bytes, or null if the file does not exist.

Parameters

filename: string

Return Type

Promise<Uint8Array | null>

Usage

import { downloadImage } from "doc.ts";