NativeScript 9.1 Released → V8 14.9, Vite 8 HMR, built for rapid agentic visual iteration
Dig in

Call Signature

ts
function getImage(url: string): Promise<ImageSource>;

Defined in: http/index.d.ts:35

Downloads the content from the specified URL and attempts to decode it as an image.

Parameters

ParameterTypeDescription
urlstringThe URL to request from.

Returns

Promise<ImageSource>

Call Signature

ts
function getImage(options: HttpRequestOptions): Promise<ImageSource>;

Defined in: http/index.d.ts:41

Downloads the content from the specified URL and attempts to decode it as an image.

Parameters

ParameterTypeDescription
optionsHttpRequestOptionsAn object that specifies various request options.

Returns

Promise<ImageSource>

Previous
getFile