Generate base64 from images