updating size of img in index