# wx.previewImage(Object object)

Previews the image in full screen on a new page. You can save or send it to others while preview.

# Parameters

# Object object

Attribute Type Default Required Description
urls Array.<string> Yes The URLs of images to preview. Cloud file IDs are supported as of 2.2.3.
current string The first image to preview among the URLs No The URL of the current image
success function No The callback function for a successful API call
fail function No Callback function for failed API call
complete function No Callback function used when API call completed (always executed whether call succeeds or fails)

# Sample Code

wx.previewImage({
  current: '', // The http link of the current image
  urls: [] // The http links of the images to preview
})
点击咨询小助手