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.

Authorizations:
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

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

Request samples

uapi --output=jsonpretty \
  --user=username \
  ImageManager \
  convert_file \
  image_file='images/myimage.jpg' \
  type='png'

Response samples

Content type
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
    }
}