Converts a Base64-encoded string into binary image data.
Syntax
bytea AI_ImageFromBase64 (text image)
Parameters
Parameter | Description |
image | The Base64-encoded string that represents the image data. The string starts with Note For more information about MIME types, see the related community documentation. |
Return values
Returns the binary image data converted from the Base64 string.
Description
The function supports the following image formats: JPEG, PNG, and BMP.
Example
If you are working with a text embedding model in Qwen LLM that requires image data as input, you can use this function to prepare the image.
SELECT AI_ImageFromBase64('data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD...');