tencent cloud

Tencent Cloud Super App as a Service

Image

Download
Focus Mode
Font Size
Last updated: 2025-04-10 18:18:34

wx.createImage

This API is called using Image wx.createImage().
Feature description: Creates an image object.
Return value:Image. An image object.

Image

Image object

Property

string src: The URL of the image.
number width: The actual width of the image.
number height: The actual height of the image.
function onload: The callback function triggered after the image is loaded.
function onerror: The callback function triggered when an error occurs while loading an image.






Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback