add loading class when loading the image for the first time