Skip to main content
Version: v3

getImageInfo(img_path)

Start from API_LEVEL 2.0 . Please refer to API_LEVEL.

Get information about the image resources in the /assets resource directory.

Type

(img_path: string) => result

Parameters

ParameterDescriptionRequiredType
img_pathThe path to the image file, relative to the /assets resource directoryYESstring

result: object

ParameterDescriptionType
widthImage width valuenumber
heightImage height valuenumber

Code example

import { getImageInfo } from '@zos/ui'

getImageInfo('test.png')