Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
July 17, 2022 03:41 pm GMT

Laravel Livewire Turbolinks with Image lazyload

I am building a website on laravel livewire. I've impimented turbolinks and to speed up the website, I am trying Vanilla LazyLoad everything is working fine until I switch pages using links.

Website is working like a SPA as expected, but when I switch page from home to any other page of same website and back to home, I ends up with dummy low quality image which is switched by lazyload on page load. I mean, when the page loaded or refreshed, I'll see dummy low quality images, which then switched to original images, but when I visit link using turbolinks images do not switch.

Anyone has any idea on this? Or any other suggestion to lazyload image in livewire turbolinks.

Thanks


Original Link: https://dev.to/shshank/laravel-livewire-turbolinks-with-image-lazyload-3kll

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To