changing base64 image decode logic in images.js