changed img codes for jpg and png