Static method for creating object URL using URL API and setting it as image 'src' attribute. If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.
name | type | description |
---|---|---|
image | HTMLImageElement |
Image object which 'src' attribute should be set to object URL. |
blob | Blob |
A Blob object to create an object URL for. |
defaultType | string |
Default mime type used if blob type is not available. |