Skip to content
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

Image not refreshing with same URL with updated image #553

Open
dhaneshgosai opened this issue Sep 13, 2022 · 1 comment
Open

Image not refreshing with same URL with updated image #553

dhaneshgosai opened this issue Sep 13, 2022 · 1 comment

Comments

@dhaneshgosai
Copy link

I got one wired issue on Lazyload library.

It's working fine with the image URL and its loading image and caching it.

But when a new image is replaced with an old one on the same URL, it does not fetch a new one from the same URL and only shows the old one from cache.

How can I refresh my cache with new image data?

Code which I am using right now:

<img class="disti-img" [defaultImage]="defaultImage" [lazyLoad]="selectedDistiImg">

Can anyone help me on this issue?

@cantoute
Copy link

cantoute commented Mar 13, 2023

+1

Having same issue and can't really identify / isolate the problem.
The bug occurs with specific images

one that creates the bug: https://boxemag.com/wp-content/uploads/2022/11/cihad-akipa.png

(It is served as webp and on this one the top of the image is transparent.)

It seams the problem has to do with "useSrcset", like displaying an image using srcset followed by one not using it.

As a temporary workaround I found that creating 2 <img> in the template combined with a *ngIf did the trick.

<img *ngIf="useSrcset" ... />
<img *ngIf="!useSrcSet" ... />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants