Check if lazyloading an image element

I added a conditional around the `$("<img />")` loading bit to make sure the lazyloaded element is an image.