URL to Base64
Fetch a publicly accessible image from a URL and convert it into a Base64 string for processing.
The URL to Base64 block allows you to bring external images into your workflow. By converting a remote image URL into a Base64 string, you can then use other blocks to resize it, extract text (OCR), or identify its color palette without needing to download the file manually.
Core Concept
Think of this block as a digital camera that takes a picture of a website's image. Instead of just having a link to the image, you now have the actual "photo data" stored in a variable, ready to be edited or analyzed.
Configuration
| Field | Required | Description |
|---|---|---|
| Image URL | ✅ | The direct link to the image (e.g., https://example.com/logo.png). The image must be publicly accessible. |
| Request Headers | — | Optional custom headers (like User-Agent or Authorization) if the source website requires them to view the image. |
| Output Variable | ✅ | The name of the variable that will store the resulting Base64 Data URI. |
This block produces a Data URI (e.g., data:image/png;base64,...). This format includes both the image type and the raw data, making it compatible with almost all other Media & Design blocks.
Error Handling
MISSING_URL— Triggered when no URL is provided.MISSING_OUTPUT_VAR— Triggered when no output variable is specified.INVALID_URL— Triggered if the URL format is incorrect.BAD_REQUEST— Triggered if the remote server returns a 400 Bad Request error.SIZE_EXCEEDED— Triggered if the image is too large (limit is 10MB) or returns a 413 error.INVALID_CONTENT— Triggered if the URL does not point to a valid image file.FETCH_FAILED— Triggered if the server could not reach the URL or the website blocked the request.
Example
- Image URL:
https://api.qrserver.com/v1/create-qr-code/?data=HelloWorld - Output Variable:
external_qr
Result: The variable {external_qr} will contain the Base64 data of the generated QR code. You can then pass this to the Host Media block to store it on your own server.
