For the complete documentation index, see llms.txt. This page is also available as Markdown.

Image methods

Image methods

The SharinPix package provides the Apex class, Image, which includes methods that can be applied when manipulating images on Salesforce.

Methods:

Image Method Example

moveImages

global static List<Object> moveImages(List<String> lstImageIds, String destinationAlbumId)

  • Moves one or more images to another album. Note: This method can be used to move a maximun of 50 images at once. Example:

sharinpix.Image.moveImages(new List<String> { 'imageId1', 'imageId2' }, 'destinationAlbumId');

exportAsContentDocument

global void exportAsContentDocument()

  • Exports a SharinPix Image to Salesforce as a Content Document. Example:

downloadImages

global static String downloadImages(List<String> imageIds)

  • Get a URL that opens a zip including the images. Example:

fetchAsBase64

global static String fetchAsBase64(String url)

  • Converts an image to base64. Example:

restoreImage

global static String restoreImage(String imageId)

  • Restores a trashed SharinPix Image. Example: