Actions132
- AI Actions
- Extract Text From Document
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Extract Entities
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate JavaScript Code
- Generate Python Code
- Detect Language
- Detect Mood
- Extract Text From PDF
- Recognize Objects in Image
- Extract Text From Image
- Redact Sensitive Information From PDF
- Remove Background Image
- Summarize Text
- Transcribe
- Translate Text
- Image Actions
- Business Actions
- Convert Actions
- Generate Actions
- Crypto Actions
- Operator Actions
- Storage Actions
- Scheduler Actions
- Text Actions
- Chart Actions
- Code Actions
- Calculate Actions
- Date and Time Actions
- PDF Actions
- Compress PDF File
- Count PDF Pages
- Create Empty PDF
- Decrypt PDF
- Convert DOCX to PDF
- Draw Image on PDF
- Draw Text on PDF
- Encrypt PDF
- Convert HTML to PDF
- Convert Markdown to PDF
- Manage PDF Metadata
- Merge PDF Files
- Add PDF Pages
- Remove PDF Pages
- Resize PDF Pages
- Rotate PDF Pages
- Convert PDF to Base64
- Convert PDF to Image
- Split PDF File
- Add Image Watermark to PDF
- Add Text Watermark to PDF
- Shortened URL Actions
Image → Convert Image Format
AI-generatedOverview
The node provides image format conversion capabilities as part of a broader utility toolkit. It allows users to convert images from one format to another, supporting both input via a publicly accessible URL or directly from base64-encoded image data (buffer). This is useful in scenarios where images need to be standardized to a specific format for compatibility, optimization, or further processing.
Practical examples include:
- Converting user-uploaded images to JPEG for web display.
- Transforming PNG logos into WebP format to reduce file size.
- Changing TIFF scans into PNG for easier sharing and viewing.
- Preserving metadata when converting professional photography images.
Properties
| Name | Meaning |
|---|---|
| Data Type | Choose the source type of the image data: either a publicly accessible URL or a base64 buffer. |
| Image URL | The URL of the image to convert (required if Data Type is URL). Must be publicly accessible. |
| Image Buffer | Base64-encoded image data to convert (required if Data Type is Buffer). |
| Target Format | The desired output image format. Options: BMP, GIF, JPEG, PNG, TIFF, WebP. |
| Include Metadata | Whether to preserve the original image's metadata in the converted output (true/false). |
| Conversion Options | Additional JSON-formatted options for conversion, e.g., quality settings for JPEG format. |
Output
The node outputs the converted image data in JSON format. The exact structure is not detailed in the provided code, but typically it would include at least:
- The converted image data, likely as a base64-encoded string or a URL to the converted image.
- Possibly metadata about the conversion process or the resulting image.
If binary data is output, it represents the converted image file in the chosen format.
Dependencies
- Requires an API key credential for authentication with the external 0CodeKit service.
- The node sends a POST request to the
/image/convertendpoint of the 0CodeKit API (https://prod.0codekit.com/image/convert). - The API expects parameters including the data type, image source (URL or buffer), target format, metadata inclusion flag, and conversion options.
Troubleshooting
Common issues:
- Providing a non-publicly accessible URL will cause the conversion to fail because the service cannot fetch the image.
- Incorrectly formatted base64 image data may result in errors or failed conversions.
- Unsupported or misspelled target formats can cause the API to reject the request.
- Invalid JSON in the "Conversion Options" property can lead to parsing errors.
Error messages and resolutions:
- "Image not found or inaccessible": Verify that the URL is correct and publicly accessible.
- "Invalid image data": Check that the base64 string is properly encoded and complete.
- "Unsupported format": Ensure the target format is one of the supported options (BMP, GIF, JPEG, PNG, TIFF, WebP).
- "Malformed JSON in options": Validate the JSON syntax in the Conversion Options field.