Create image with new format

This function converts an image to a new file format.

Important:

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

SecurityBasicAuth
Request
query Parameters
image_file
required
string

The image file to convert, relative to the cPanel account's /home directory.

Example: image_file=images/myimage.jpg
type
required
string

The format to which to convert the images.

Example: type=png
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/ImageManager/convert_file
Request samples
uapi --output=jsonpretty \
  --user=username \
  ImageManager \
  convert_file \
  image_file='images/myimage.jpg' \
  type='png'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "convert_file",
  • "module": "ImageManager",
  • "result": {
    • "data": {
      • "converted_file": "/home/cptest1/images/myimage.png"
      },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}