Add support for other image formats by the use of canvas. 

Relying on canvas for conversion of other image formats into jpeg
dataurl.