Changed the line around and still did not change the file extensions. I'm checking the extensions by going to File > Edit Links to Images and they still show png after running the script.