Skip to content

A self-hosted media server and file management system

fix: lazy image is blank for a second on load

aminnausin88c0c20d3942
diff --git a/resources/js/components/lazy/LazyImage.vue b/resources/js/components/lazy/LazyImage.vue
index f6aa2023..4a0aa177 100644
--- a/resources/js/components/lazy/LazyImage.vue
+++ b/resources/js/components/lazy/LazyImage.vue
@@ -22,6 +22,7 @@ const props = withDefaults(
loading: 'lazy',
},
);
+
const attrs = useAttrs();
const isLoading = ref(false);
@@ -52,7 +53,7 @@ watch(
:fetchpriority="fetchPriority"
:alt="isError || !isLoaded ? '' : alt"
:src="src"
- :class="[{ 'lazy-image transition-opacity duration-700 ease-in-out': animate }, { loaded: isLoaded }]"
+ :class="['lazy-image', { 'transition-opacity duration-700 ease-in-out': animate }, { loaded: isLoaded }]"
@load="
isLoading = false;
isError = false;