Removing loading gif after first image has loaded