Fixed loading animation so it will stop when image uploads are finished