example of how to convert an image to data URI using only javaScript!