Change image to ajax-loader when closing lightbox

This could fix #3229. I was not able to reproduce the bug on my dev-server because the images are opened too fast (from localhost).

Steps to reproduce the bug:
1. Upload a few big images and post them all together in one post (loading them from the server should take a while)
2. Click on the first image to open the lightbox.
3. Close the lightbox
4. Click on another image to open the lightbox.

You shouldn't be able to see the first image. Instead there should be a loader or you should see the second image.