0

Good Evening,

I am building a website and I will be loading images from a remote website. Right now the page is blank until the images completely load. I was hoping someone can show me an easy to to show progress of the images being loaded either by a percentage number or using something like a bootstrap progress bar.

Right now I am using pure HTML:

<img src="http://www.someWebSite.com/testImage.png" alt="Test">

Any Recommendations?

user964627
  • 655
  • 3
  • 14
  • 24

2 Answers2

0

I would recommend using bootstrap(or any other framework). Using JQuery to make psuedo code

('#yourDiv').append(#loading);
('#yourImage').onLoad(function(){
     ('#yourDiv').append(#yourImage);
     ('#yourDiv').delete(#loading)
});

Where

  1. yourDiv is the parent div,
  2. Loading is loading animation
  3. yourImage is the html image
Luc-Olsthoorn
  • 186
  • 2
  • 13
-1

Check out this thread which explains how to display load progress of an image JavaScript loading progress of an image

Community
  • 1
  • 1
anulaibar
  • 310
  • 2
  • 9