Skip to content

Commit

Permalink
v.2.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
JayChase committed Feb 26, 2020
1 parent e2e9f4d commit 4c8b43e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"explorer.compactFolders": false
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 2.0.8

## Improvements

- set native lazy loading true on img by default (ready for browser support)

# 2.0.0

## Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ The data context for the template is:
media="(min-width: 1920px)"
type="image/jpeg"
/>
<img src="assets/images/banner.jpg" alt="test" />
<img src="assets/images/banner.jpg" alt="test" loading="lazy" />
</picture>
```

Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-picture/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-picture",
"version": "2.0.7",
"version": "2.0.8",
"repository": {
"type": "git",
"url": "https://github.com/jaychase/ngx-picture.git"
Expand Down
8 changes: 7 additions & 1 deletion projects/ngx-picture/src/lib/picture/picture.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
>
</ng-container>
<ng-template #defaultImageTemplate>
<img [src]="src" [alt]="alt" (load)="loaded.emit($event)" #img />
<img
[src]="src"
[alt]="alt"
(load)="loaded.emit($event)"
loading="lazy"
#img
/>
</ng-template>
</picture>

0 comments on commit 4c8b43e

Please sign in to comment.