detect if image_url is outputting a photo or a web_photo and change the file extension accordingly!