Add onload functions to ensure image load on spin