2019-03-11 UTC
# jeremycherfas I have an image-handling problem in PHP. I'm scraping images from a site, and I do not know in advance whether they are jpg or png (unlikely to be anything else). I need to resize and then save. I can find image type, and I was wondering, is there a reverse of image_type_to_extension? That is, if I have the extension, use that in imagecreatefromjpeg or imagecreatefrompng?