Mobile app version of vmapp.org
Login or Join
Jessie594

: How do I delay a .gif image until the user scrolls down to it? I have multiple .gif files that I want to post on a forum, it's powered by myBB. Anyways, I want these to load sequentially

@Jessie594

Posted in: #Forum #Gif #Images

I have multiple .gif files that I want to post on a forum, it's powered by myBB. Anyways, I want these to load sequentially as the user scrolls. E.g first .gif loads, user scrolls down, second .gif loads. I've been searching for days and I still can not get it. Thanks

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie594

2 Comments

Sorted by latest first Latest Oldest Best

 

@Jamie184

Consider using Discourse instead, it's free, open-source and superior to myBB in so many ways. Most importantly it supports lazy-loading. The Discourse project is headed up by Jeff Atwood one of the founders of the Stack Exchange network.

10% popularity Vote Up Vote Down


 

@Eichhorn148

The name of the feature that you are looking for is called "lazy load". The technique typically works by initially showing a 1x1 transparent placeholder, and then using JavaScript to swap it out for the real image on scroll.

Here are some sites that provide code to do this for you:

css-tricks.com/snippets/javascript/lazy-loading-images/ -- About 60 lines of Javascript www.appelsiini.net/projects/lazyload - A jQuery plugin luis-almeida.github.io/unveil/ -- Another jQuery plugin


For this to work, you must be able to alter the forum software to include the required javascript in the page. You won't be able to do this all within a forum post.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme