v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
ImageManager
Image Tools

Save resized image

This function resizes a specified image.

Important:

When you disable the WebServer role, the system disables this function.

get/ImageManager/resize_image

Query parameters

heightinteger required
Example:300

The height to which to set the image size.

image_filestring required
Example:/images/image.jpg

The name of the file to scale.

Note:

Use the absolute filepath or a filepath relative to the user's home directory.

widthinteger required
Example:200

The width to which to set the image size.

save_original_asstring
Example:images/original.jpg

The path to the directory in which to save a copy the original image file.

Note:

  • If you don't pass this parameter, the function doesn't save a copy of the original image.
  • Use the absolute filepath or a filepath relative to the user's home directory.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "resize_image",
  "module": "ImageManager",
  "result": {
    "data": "/home/cptest1/images/myimage.jpg",
    "status": 1
  }
}