$media->type()

Returns the file type (image, document, video, archive, code, audio, unkown)

  • return (string)

Example

echo $media->type();

All file types

Type Extensions
image jpg, gif, png, svg, ico, tiff, bmp, psd, ai
document md, pdf, doc, docx, xls, xlsx, ppt, csv, rtf
archive zip, tar, gz, gzip, tgz
code js, css, html, xml, json
video mov, avi, ogg, ogv, webm, flv, swf, mp4, mv4
audio mp3, m4a, wav, aiff, midi

Is something missing or incorrect? Edit this page on Github…