image-loader update doc about supported schemes
This commit is contained in:
parent
75088d8414
commit
d264671d40
@ -30,6 +30,34 @@ Default instance of `AsyncDrawableLoader` can be obtain like this:
|
||||
AsyncDrawableLoader.create();
|
||||
```
|
||||
|
||||
### Scheme support
|
||||
|
||||
By default `AsyncDrawableLoader` handles these URL schemes:
|
||||
* `file` (including reference to `android_assets`)
|
||||
* `data` <Badge text="2.0.0" /> ([wiki](https://en.wikipedia.org/wiki/Data_URI_scheme))
|
||||
for inline image references
|
||||
* all other schemes are considered to be network related and will be tried to obtain
|
||||
from network
|
||||
|
||||
#### Data <Badge text="2.0.0" />
|
||||
|
||||
`data` scheme handler supports both `base64` encoded content and `plain`:
|
||||
|
||||
```html
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" alt="Red dot" />
|
||||
```
|
||||
|
||||
```html
|
||||
<img src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg>' >
|
||||
```
|
||||
|
||||
:::warning Note
|
||||
Data uri works with native markdown images, but only in base64 mode:
|
||||
```markdown
|
||||

|
||||
```
|
||||
:::
|
||||
|
||||
## Configuration
|
||||
|
||||
If you wish to configure `AsyncDrawableLoader` `#builder` factory method can be used:
|
||||
|
Loading…
x
Reference in New Issue
Block a user