Added local file support

Had to make the cross-origin attribute of the image be set only for web
uploads (it worked either way in my fiddle though...)