Changed php to deal with .jpg and .jpeg instead of .png