
File::type::webimages determines the file type of web images using magic. mime_type() can use either a filename, or file contents, to determine the type of a file. the process involves looking the data at the beginning of the file, sometimes called "magic numbers".