Skip to main content

Function: fetchOgImageBlob()

fetchOgImageBlob(ogImageUrl): Promise<Uint8Array>

Defined in: web/lib/bluesky/post-service.ts:204

Fetch an OG image and convert to Uint8Array for embedding.

Parameters​

ogImageUrl​

string

URL to the OG image

Returns​

Promise<Uint8Array>

Image bytes as Uint8Array

Remarks​

Fetches the image from the given URL and returns the bytes. If the image is larger than 1MB, it will throw an error.

Throws​

Error if fetch fails

Throws​

Error if image exceeds 1MB