Added base64 encoding for image