0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

Image → Convert

AI-generated

Overview

This node operation converts an image from one format to another. It supports input images provided either as a publicly accessible URL or as a buffer. Users can specify the desired output format (e.g., GIF, JPEG, PNG, TIFF, WEBP) and choose whether to include metadata in the converted image. Additional conversion options such as quality settings can be provided in JSON format. The node can also return the converted image as a URL or as binary data, and allows specifying a filename for the output image.

Use Case Examples

  1. Converting a PNG image from a URL to JPEG format with metadata included.
  2. Converting an image buffer to WEBP format with custom quality settings.
  3. Converting an image from a URL to TIFF format and retrieving the result as a URL.

Properties

Name Meaning
Code Variables Variables defined in the code editor that can be used during the conversion process.
Type of Data Specifies whether the input image is provided as a URL or as a buffer.
URL The publicly accessible URL of the image to convert. Required if Type of Data is URL.
Buffer The buffer of the image to convert. Required if Type of Data is Buffer.
Output Format The desired output format of the converted image (e.g., GIF, JPEG, PNG, TIFF, WEBP).
With Metadata Whether to include metadata in the converted image.
Options Additional options to pass to the convert operation, such as quality settings, provided in JSON format.
File Name Filename of the image to operate on.
Get File as URL Whether to get the converted image as a URL.

Output

Binary

The node can output the converted image as binary data if requested.

JSON

  • url - URL of the converted image if 'Get File as URL' is true.
  • buffer - Buffer of the converted image if 'Get File as URL' is false.
  • fileName - Filename of the converted image if specified.
  • metadata - Metadata of the converted image if 'With Metadata' is true.

Dependencies

  • Requires an API key credential for the CodeKit API to perform the image conversion.

Troubleshooting

  • Ensure the input image URL is publicly accessible if using URL input type.
  • Verify that the buffer input is correctly formatted and valid if using buffer input type.
  • Check that the output format is supported and correctly specified.
  • If the node fails, verify that the API key credential is valid and has the necessary permissions.

Discussion