Ionic 3.9.2 Some Images are loaded some not
See original GitHub issueHi, trying to implement your Module to Lazy Load Images. I’m using Ionic with Shopify. Therefore i catch Images from a CDN.
But i cannot get it working it should. As you can see, the images on the right side are loaded, but not all
Home.html
<ion-content #homecontainer>
<ion-item color="dark">
<img src="/assets/images/myspaeti-logo@2x.png" class="home__logo">
</ion-item>
<ion-grid>
<ion-row class="row__home">
<ion-col col-6 col-sm-4 *ngFor="let item of collections" tappable (click)="openCollection(item)">
<div class="home__category">
<div class="home__image">
<img [defaultImage]="'https://www.placecage.com/1000/1000'" [lazyLoad]="item.attrs.image.src" [offset]="offset" [scrollTarget]="homecontainer.scrollElement">
</div>
<div class="home__title">
{{item.attrs.title}}
</div>
</div>
</ion-col>
</ion-row>
</ion-grid>
</ion-content>
When i inspect the code i get this Image that has been loaded
<img ng-reflect-lazy-image="https://cdn.shopify.com/s/file" ng-reflect-default-image="https://www.placecage.com/1000" src="https://cdn.shopify.com/s/files/1/2262/0831/collections/Susswaren_Collection.jpg?v=1524510650" class="ng-lazyloaded">
Image that has not been loaded
<img ng-reflect-lazy-image="https://cdn.shopify.com/s/file" ng-reflect-default-image="https://www.placecage.com/1000" src="https://www.placecage.com/1000/1000">
Do i miss something?
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (4 by maintainers)
Top Results From Across the Web
When generating the Build for IOS, the images in the assets ...
Using Ionic Serve, opening in the browser, the images load ... But by doing a build and installing on an iPhone, the images...
Read more >Image is not loading in Ionic 3 - Stack Overflow
I am working on ionic 3. I updated ionic-cli, nodejs and cordova versions in the project. After updating the version, the images are...
Read more >How to Cache Image Files with Ionic & Capacitor - YouTube
If you want to implement caching inside your Ionic app and want to make sure your images are locally available as well, you...
Read more >Ionic images not loading after running app on an iOS device ...
This is due to a path issue with the root of your app. Making the path relative will stop any confusion. Share. Topic...
Read more >Ionic 4 Loading local image not working on IOS but ... - Reddit
I'm trying to load a image from users phone, crop it and then display. Im using the webview plugin to do that. It...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tjoskar This works for me now.
@magic-77, I tested your code now and it seems to work if you set a proper width and height on the image.
eg.
I’m not total sure what the problem was but it is alwas a good idea to set a width and height on the images.