Skip to content

Commit

Permalink
Updated README.md
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Welch <andrew@nystudio107.com>
  • Loading branch information
khalwat committed Nov 18, 2018
1 parent 00c2991 commit 464656a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ If you're using the [LazySizes](https://github.com/aFarkas/lazysizes) JavaScript

```
{% set optimizedImages = entry.myAssetField.one().optimizedImagesField %}
<img src="{{ optimizedImages.placeholderBox() }}"
<img class="lazyload"
src="{{ optimizedImages.placeholderBox() }}"
data-srcset="{{ optimizedImages.srcset() }}"
sizes="100vw" />
```
Expand Down Expand Up @@ -380,11 +381,12 @@ If you're using the [LazySizes](https://github.com/aFarkas/lazysizes) JavaScript
{% set optimizedImages = entry.myAssetField.one().optimizedImagesField %}
<picture>
<source data-srcset="{{ optimizedImages.srcsetWebP() }}"
sizes="100vw"
type="image/webp" />
<img src="{{ optimizedImages.placeholderBox() }}"
data-sizes="100vw"
type="image/webp" />
<img class="lazyload"
src="{{ optimizedImages.placeholderBox() }}"
data-srcset="{{ optimizedImages.srcset() }}"
sizes="100vw" />
data-sizes="100vw" />
</picture>
```

Expand Down

0 comments on commit 464656a

Please sign in to comment.