Added onprogress event for tracking image loading