Skip to main content

Convert Image Format using n8n action

PDF4me Convert Image Format transforms images between different file formats through n8n automation workflows. Process images via n8n triggers, binary data, base64 strings, or public URLs to convert between JPG, PNG, GIF, BMP, WEBP, and TIFF formats with preserved image quality, intelligent color space handling, transparency support, and format-specific optimizations. This solution is ideal for web optimization, format standardization, compatibility requirements, social media preparation, print workflows, and automated format conversion that require reliable image transformation with quality preservation and seamless integration.

Setup

Add the PDF4me "Convert Image Format" node to your n8n workflow and configure the required parameters. For initial setup instructions, see our n8n Integration Guide.

Prerequisites:

  • PDF4me API credentials
  • n8n workflow access

Configuration:

  1. Add PDF4me node to workflow
  2. Select "Convert Image Format" action
  3. Configure input parameters (see below)
Convert Image Format

Parameters

Complete list of parameters for the Convert Image Format action. Configure these parameters to control image format conversion.

Important: Parameters marked with an asterisk (***) are required and must be provided for the action to function correctly.

ParameterTypeDescriptionExample
Input Image Data TypeStringYesPDF4me image input format selection
Choose the format of your source image data input.
PDF4me supports multiple input types with different field requirements
1) Binary DataYes (One Required)1) Binary Data - Use "Input Binary Field" to reference image file from previous node
2) Base64 StringYes (One Required)2) Base64 String - Use "Base64 Image Content" field for encoded image data
3) URLYes (One Required)3) URL - Use "Image URL" field to provide a public/open permission URL to the image file to convert
Input Binary FieldBinaryYes (If Binary Data)PDF4me binary image file input - Reference source image file (.jpg, .png, .gif, .bmp) from previous n8n node or file upload. PDF4me processes binary image files with automatic format detection and validation. Required when Input Image Data Type is "Binary Data"
Base64 Image ContentStringYes (If Base64 String)PDF4me base64 encoded image input - Provide source image data (.jpg, .png, .gif, .bmp) as base64 encoded string for secure transmission. PDF4me automatically decodes and processes the image content. Required when Input Image Data Type is "Base64 String"
Image URLStringYes (If URL)PDF4me public image URL input - Provide a public/open permission URL to the source image file (.jpg, .png, .gif, .bmp) to be converted. PDF4me downloads and processes the file from the provided URL. Required when Input Image Data Type is "URL"
Current Image FormatStringYesPDF4me source format specification - Specify the current format of the input image. PDF4me uses this information to optimize the conversion process and ensure accurate format handling
JPGYes (One Required)JPEG Format - Joint Photographic Experts Group format with lossy compression, commonly used for photographs and complex images
PNGYes (One Required)PNG Format - Portable Network Graphics format with lossless compression and transparency support
GIFYes (One Required)GIF Format - Graphics Interchange Format with limited colors and animation support
BMPYes (One Required)BMP Format - Bitmap format with uncompressed pixel data
WEBPYes (One Required)WEBP Format - Modern web image format with superior compression and quality
TIFFYes (One Required)TIFF Format - Tagged Image File Format with lossless compression and professional features
New Image FormatStringYesPDF4me target format selection - Choose the desired output format for the converted image. PDF4me supports multiple formats with different characteristics and optimization features
JPGYes (One Required)JPEG Format - Joint Photographic Experts Group format with lossy compression, ideal for photographs and complex images with excellent file size reduction
PNGYes (One Required)PNG Format - Portable Network Graphics format with lossless compression, ideal for graphics with transparency and sharp edges
GIFYes (One Required)GIF Format - Graphics Interchange Format with limited colors, ideal for simple graphics and animations
BMPYes (One Required)BMP Format - Bitmap format with uncompressed data, ideal for high-quality archival purposes
WEBPYes (One Required)WEBP Format - Modern web image format with superior compression and quality, ideal for web optimization
TIFFYes (One Required)TIFF Format - Tagged Image File Format with lossless compression, ideal for professional printing and archival
Output File NameStringYesPDF4me converted image output filename - Specify the name for the generated converted image file with proper extension (.jpg, .png, .gif, .bmp, .webp, .tiff). PDF4me ensures unique naming and validates file format compliance
Binary Data Output NameStringYesPDF4me binary data mapping - Define the variable name for accessing the generated converted image binary data in your n8n workflow. This binary data can be used as input data in subsequent actions within your workflow

Supported Image Formats

FormatDescriptionFile ExtensionsMax SizeCompression TypeBest Use Cases
JPEGJoint Photographic Experts Group with lossy compression optimized for photographs.jpg, .jpeg50MBLossyPhotographs, complex images, web content, social media
PNGPortable Network Graphics with lossless compression and transparency support.png50MBLosslessGraphics with transparency, logos, screenshots, web graphics
GIFGraphics Interchange Format with limited color palette and animation support.gif50MBLosslessSimple graphics, animations, web icons, low-color images
BMPBitmap image format with uncompressed pixel data.bmp50MBUncompressedHigh-quality archival, professional printing, detailed graphics
WEBPModern web image format with superior compression and quality.webp50MBLossy/LosslessWeb optimization, modern browsers, mobile applications
TIFFTagged Image File Format with lossless compression and professional features.tiff, .tif50MBLosslessProfessional printing, archival, high-quality documents

Output

Output Parameters

ParameterTypeDescriptionExample
fileNameStringPDF4me generated image filename - The complete filename of the successfully converted image with proper extension. PDF4me ensures unique naming and validates file format compliance for seamless integration with downstream processesconverted_image.png
fileSizeNumberPDF4me converted image file size in bytes - The exact size of the generated converted image file in bytes, provided by PDF4me for storage planning, bandwidth optimization, and file transfer monitoring. Essential for enterprise image management and workflow automation125430
originalFileSizeNumberPDF4me original file size in bytes - The size of the original image file before conversion, provided for comparison and conversion efficiency calculation245760
originalFormatStringPDF4me source format confirmation - The original format of the input image, confirming the source format that was processed during conversionJPG
convertedFormatStringPDF4me target format confirmation - The final format of the converted image, confirming the target format that was generated during conversionPNG
successBooleanPDF4me conversion status indicator - Boolean flag indicating the success or failure of the image format conversion process. PDF4me returns true for successful operations and false for any errors, enabling robust error handling in automated workflowstrue
mimeTypeStringPDF4me output MIME type - MIME type of the generated converted image file (e.g., "image/jpeg", "image/png"). Useful for content type validation and proper file handling in web applicationsimage/png
messageStringPDF4me conversion status message - Human-readable status message providing details about the image format conversion process result. Includes success confirmation or error details for troubleshootingImage format converted successfully

N8N Action Response

The PDF4me Convert Image Format API returns a response that can be viewed in multiple formats. Choose the view that best fits your needs:

JSON Response Format

The raw JSON response from the API:

[
{
"success": true,
"message": "Image format converted successfully",
"fileName": "converted_image.webp",
"mimeType": "image/png",
"fileSize": 125430,
"originalFileSize": 245760,
"originalFormat": "JPG",
"convertedFormat": "PNG"
}
]

Use Cases

Web Optimization and Compatibility

  • Convert images to web-optimized formats like WEBP for modern browsers
  • Transform legacy formats to standard web formats for better compatibility
  • Optimize images for different devices and screen resolutions

Content Management and Archival

  • Standardize image formats across content management systems
  • Convert images to archival formats like TIFF for long-term storage
  • Transform images for different publishing platforms and requirements

E-commerce and Marketing

  • Convert product images to optimal formats for online stores
  • Transform marketing materials for different social media platforms
  • Optimize images for email campaigns and digital advertising

Get Help