Convert image to base64
Is there any reason for this?
I'm just using $.get and base64 encoding function data()
Another SO Question covers this exact topic and has a solution that works for IE and Firefox. The short answer is that XHR really isn't designed for binary data and the data gets corrupted or truncated when converted to a string for XHR.responseText.
It would be best to Base 64 encode on the server side.