started image loading at top of javascript