Detecting Image Load Completion with the onload Event and Understanding Image Request Timing
This article explains how to use the onload event to determine when an Img element has finished loading, provides JavaScript examples for sequential loading, discusses why onreadystatechange is unsuitable, and explores when browsers issue image requests and how CSS affects them.