Skip to content

Image

wx.createImage

TIP

The API usage is as follows: Image wx.createImage()

  • Functional description: Create an image object.
  • Return value: Image Image object.

Image

Image object.

Properties

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