-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement webp and png formats load both images #480
Comments
Hi, When you say: "but it loads me both images." what two images do you mean? The two I see that you have two <picture>
<source type="image/webp" [attr.defaultImage]="'assets/img/loading.gif'" [attr.lazyLoad]="item.baseImage+'webp/100x100/'+item.icon+'.webp'"/>
- <source type="image/webp" [attr.defaultImage]="'assets/img/loading.gif'" [attr.lazyLoad]="item.baseImage+'100x100/'+item.icon+'.png'" />
<img [defaultImage]="'assets/img/loading.gif'" [lazyLoad]="item.baseImage+'100x100/'+item.icon+'.png'" alt="{{item.name}}">
</picture> |
I can confirm this with Angular 11 with SSR |
Update: I had to have some issue in my code. After reviewing the docs again, this works as expected :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I have a problem with the implementation of the webp images in my project, the lazy load works fine, but it loads me both images.
Thanks
Angular: 8.2.14
The text was updated successfully, but these errors were encountered: