I am currently re-writing an existing tool in PHP that another person started for optimizing images, for gif images,I will convert to png and then optimize the png file. For animated gifs I will run through the program called Gifsicle which can optimize animated gif images.
In some of the existing codebase, the other guy identified animated gif images with the file extension gifgif as you can see in the snippets below, they contain all the code that references this gifgif.
I have search Google and I cannot find a mention of a gifgif file anywhere, in addition I have never in my life heard of one.
Can someone help me figure out does the actual extension gifgif exist? Is it possibly something that is embedded in animated gif files?
The code…
$types = array("gif", "png", "gifgif", "jpg", "jpeg", "bmp");
and
if (substr($type, 0, 6) === "gifgif")
{
$type = "gifgif";
}
and
case "gifgif":
$dest_file .= ".gif";
$cmd = "/usr/bin/gifsicle -O2 $src_file > $dest_file";
exec($cmd, $return, $error);
This is not a standard extension and the code you show appears to care only about file extensions.
Presumably the developer of the system you are using came up with the convention and it is unique to that system.