Adding loading to preview of images