Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rebellapp.com/llms.txt

Use this file to discover all available pages before exploring further.

Use this API to reduce the file size of an image.

Parameters

PropertyTypeRequiredDescription
apFilePathsArrayYesArray of image paths to compress
compressLevelNumberNoCompression level (0-4, default: 4)
successFunctionNoCallback with compressed paths
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Success Callback

PropertyTypeDescription
apFilePathsArrayPaths to compressed images

Code Example

my.compressImage({
  apFilePaths: ['/local/path/image.jpg'],
  compressLevel: 2,
  success: (res) => {
    console.log('Compressed:', res.apFilePaths);
  }
});