vue-lazyload icon indicating copy to clipboard operation
vue-lazyload copied to clipboard

v-lazy fires twice

Open m-kiss86 opened this issue 5 years ago • 14 comments

I am using the v-lazy on the <img> element.

Lazy load works fine, however, the issue is the request fires twice?

import VueLazyload from 'vue-lazyload'; Vue.use(VueLazyload, { attempt: 1, preLoad: 1 }); <img v-lazy="'{{asset('/images/svg/personalise.svg')}}'" class="lazy" alt="Personalise Icon">

I am using this inside the Blade file in the Laravel project.

Screenshot 2019-08-02 at 13 23 42

m-kiss86 avatar Aug 02 '19 12:08 m-kiss86

i am also has this issue

Brittani avatar Aug 08 '19 08:08 Brittani

Same here, did anyone find a solution?

nonlinearcom avatar Aug 23 '19 19:08 nonlinearcom

Same issue for me, kind of makes this plugin a bit useless.

blowsie avatar Sep 16 '19 11:09 blowsie

Same issue here

leovdw avatar Sep 17 '19 08:09 leovdw

Same issue here,

image

raisezhang avatar Sep 27 '19 09:09 raisezhang

Same here

cewald avatar Oct 04 '19 08:10 cewald

I'm having the same issue.

ross-crowdsmart avatar Oct 09 '19 17:10 ross-crowdsmart

I found that if the disabled cache was turned on, there would be two requests. Disabled this option won't have this problem.

Turn on Disable cache

image

Turn off Disable cache

image

raisezhang avatar Oct 10 '19 02:10 raisezhang

While this is unlikely to be a problem in production because of browser's caching behaviour, it still should be fixed.

Merott avatar Jul 09 '20 11:07 Merott

While this is unlikely to be a problem in production because of browser's caching behaviour, it still should be fixed.

Would you please further explain why it's unlikely to be a problem? It seems that the superfluous request does affect the performance of the website, as the Waterfall chart showed in Chrome and my test result.

CarlSome avatar Nov 24 '20 07:11 CarlSome

While this is unlikely to be a problem in production because of browser's caching behaviour, it still should be fixed.

Would you please further explain why it's unlikely to be a problem? It seems that the superfluous request does affect the performance of the website, as the Waterfall chart showed in Chrome and my test result.

I believe the reason for the comment "unlikely to be a problem in production" is because a normal user won't be opening their dev tools and browsing with cache disabled, however as mentioned it should still be fixed. I am still experiencing this issue two years later.

hcmlopes avatar Feb 23 '22 20:02 hcmlopes

Hi,

I am actually having the same issue even though I turned off "disable cache" still getting two request to same image. Any fix on this ?

naimlatifi5 avatar Mar 31 '22 11:03 naimlatifi5

I'm having the same issue,how to resolve it ?

ITcx1212 avatar Nov 27 '23 07:11 ITcx1212

Hi,

I am actually having the same issue even though I turned off "disable cache" still getting two request to same image. Any fix on this ?

Have you resolved it?

ITcx1212 avatar Nov 28 '23 01:11 ITcx1212