Skip to content

Commit

Permalink
docs: update source directive code example (#419)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasKruckenberg authored Oct 11, 2022
1 parent 70b7872 commit 3734c4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ import webp from 'example.jpg?w=500;900;1200&webp&source'
import fallback from 'example.jpg?w=700'

const html = `<picture>
<source srcset="${avif.src} ${avif.w}" type="image/avif" />
<source srcset="${webp.src} ${webp.w}" type="image/webp" />
<source srcset="${avif.map(({src, w}) => `${src} ${w}w`).join(',')}" type="image/avif" />
<source srcset="${webp.map(({src, w}) => `${src} ${w}w`).join(',')}" type="image/webp" />
<img src="${fallback}" />
</picture>
```
Expand Down

0 comments on commit 3734c4f

Please sign in to comment.