Hide loading animation after media has been loaded

Showing the animation looks realy annoying behind smaller images or images with transparent parts.