MatteoGabriele / vue-progressive-image

Vue progressive image loading plugin
https://matteo-gabriele.gitbook.io/vue-progressive-image/
MIT License
721 stars 43 forks source link

onLoad is being called for both main image and fallback image #66

Closed xaksis closed 2 years ago

xaksis commented 5 years ago

If you are reporting a bug, please fill in below. Otherwise feel free to remove this template entirely.

Description

onLoad event is being triggered for both main image and for fallback image. So, when there's an error onError is called immediately followed by an onLoad event (for fallback image).

Expected behavior

onLoad should only be called for main image and maybe we can have a separate event for fallback image, like onPlaceholderLoad, onFallbackLoad?

Actual behavior

Same event (onLoad) is triggered for both main image and fallback image