added method to replace image with base64 data instead of a file