added function to convert image to base64 string to Utils.js