Looking for loading effect tutorials

I want to make a loading effect (similiar to lightbox but with loading animation gif) while loading an image and remove the loading effect after image has been sucessfully loaded.

Is there any jQuery tutorial for this technique?

Can someone advise?