Skip to content

Commit

Permalink
Fix HTML img example in README using Base64 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Borewit committed Aug 2, 2024
1 parent 9aeca9c commit ce263a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,9 @@ export interface IPicture {
To assign `img` HTML-object you can do something like:
```js
img.src = `data:${picture.format};base64,${picture.data.toString('base64')}`;
import {uint8ArrayToBase64} from 'uint8array-extras';

img.src = `data:${picture.format};base64,${uint8ArrayToBase64(picture.data)}`;
```
## Frequently Asked Questions
Expand Down

0 comments on commit ce263a0

Please sign in to comment.