Tools API for encoded the image into a base64 string.