remove jpg from the end of the line