0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions132

Image → Overlay Images

AI-generated

Overview

The node provides an image processing utility specifically for overlaying one image on top of another. It supports two data input types: URLs pointing to images or base64-encoded image buffers. Users can specify the position (X and Y coordinates) where the overlay image should be placed on the base image.

This node is beneficial in scenarios such as:

  • Adding watermarks or logos onto photos.
  • Creating composite images by layering graphics.
  • Annotating images with icons or badges dynamically.

For example, a marketing automation workflow could use this node to add a company logo overlay to product images before publishing them online.

Properties

Name Meaning
Data Type Choose the source type of the images: either "URL" (image accessible via web URL) or "Buffer" (base64-encoded image data).
Base Image URL The URL of the base image onto which the overlay will be applied (required if Data Type is URL).
Base Image Buffer The base64-encoded string representing the base image (required if Data Type is Buffer).
Overlay Image URL The URL of the overlay image to place on top of the base image (required if Data Type is URL).
Overlay Image Buffer The base64-encoded string representing the overlay image (required if Data Type is Buffer).
X Position Horizontal pixel coordinate specifying where to place the overlay image relative to the base image's left edge. Default is 0.
Y Position Vertical pixel coordinate specifying where to place the overlay image relative to the base image's top edge. Default is 0.

Output

The node outputs a JSON object containing the resulting image after applying the overlay. The output image is typically encoded in a format suitable for further processing or saving, such as a base64-encoded string or a URL to the processed image (depending on the underlying service response).

If binary data is included, it represents the final composited image file.

Dependencies

  • Requires an API key credential for authentication with the external image processing service at https://prod.0codekit.com.
  • The node sends a POST request to the /image/overlay endpoint of this service with the provided parameters.
  • Proper network access to the URLs specified for the base and overlay images is necessary if using URL inputs.

Troubleshooting

  • Invalid Image Data: If the base or overlay image URLs are inaccessible or the base64 strings are malformed, the node may fail. Ensure URLs are reachable and base64 data is correctly formatted.
  • Positioning Issues: Incorrect X or Y values might cause the overlay to appear outside the visible area. Use sensible pixel values within the dimensions of the base image.
  • Authentication Errors: Missing or invalid API credentials will prevent the node from functioning. Verify that the API key is correctly configured in n8n credentials.
  • Unsupported Image Formats: The external service may not support all image formats. Use common formats like JPEG or PNG.
  • Timeouts or Network Errors: Large images or slow networks might cause timeouts. Optimize image sizes or check connectivity.

Links and References

Discussion