The FileReader.onload property contains an event handler executed when the load event is fired, when content read with readAsArrayBuffer, readAsBinaryString, readAsDataURL or readAsText is available..
Once the image has been downloaded this will trigger. Create a function preloadImages(sources, callback) that loads all images from the array sources and, when ready, runs callback. Then i put the same code in sharepoint html file and tested then it is working fine in windows 7 but not in enterprise 14393+ edge 38.14393.x .I am still not sure about the issue . Later, when the same image appears in the document (no matter how), it shows up immediately. Specifically, the onload event doesn't fire.

When you use URL as image, to show icons in Power BI, I'm having a problem specific on Edge, and in some reports: Chrome: Ok, show images and doesn't break the line when the file name starts. The browser starts loading the image and remembers it in the cache. If you’re gonna use a script like this it may not be appropriate to fall back on window.onload – it certainly isn’t appropriate to do that by defualt – because these are two entirely separate points in time, and a script designed to work with one point won’t necessarily work with the other. It works great among normal browsers (eg. Chrome, FF, Safari, IE9) but Internet Explorer 7 and 8 give me a hard time.

Post your question and get tips & solutions from a community of 450,339 IT Pros & Developers.

I put above code in html file and tested it is working fine in enterprise and edge 38. Once you set the src attribute on this image downloading will start, so before that we want to create a handler for the onload event. Once the image has been downloaded this will trigger. It's quick & easy. Images not showing on Microsoft Edge, but showing in Chrome, Firefox and Internet Explorer. Thanks for the reply. The onload event can also be used to deal with cookies (see "More Examples" below). Need help?

The onload event can be used to check the visitor's browser type and browser version, and load the proper version of the web page based on the information.