Changing the size of the picture and fixing index to refer it