Overview
Internet media types (aka MIME types) are small strings that describe the type of some digital content. Some example media types are:
- text/html
- image/jpeg
- video/mp4
As you can see, the general format is: <major_type>/<minor_type>
There are hundreds of media types.
Allowing / blocking
Media types can be specified in Plucky rules to allow or block certain types of content. Here are some examples of commands you could use to add such rules:
To allow all images on Facebook:
pluck + allow facebook.com image/
To allow SVG images everywhere:
pluck + allow image/svg
To block Adobe Flash on a particular page:
pluck + block https://example.com/foo.html application/x-shockwave-flash
The general format of these commands is:
pluck <+ / -> <rule type> [host / url / ip address / port] <media type>
(See rules to understand what the terms in the general form mean.)
Major types
There are only a handful of useful major media types:
- application
- the largest major media type, having hundreds of sub-types
- audio
- audio content
- font
- a relatively young type used for new fonts
- image
- image content
- text
- words (text/css, text/html, and text/plain are the most important)
- video
- video content
Noteworthy types
application
- application/javascript
- The most common label for JavaScript.
- application/msword
- Old Microsoft Word documents (
.doc
). - application/octet-stream
- A catch-all for binary content.
- application/pdf
- Most PDF files.
- application/vnd.ms-powerpoint
- Old Microsoft PowerPoint presentations (
.ppt
). - application/vnd.openxmlformats-officedocument.presentationml.presentation
- Microsoft PowerPoint presentations (
.pptx
). - application/vnd.openxmlformats-officedocument.wordprocessingml.document
- Microsoft Word documents (
.docx
) - application/x-shockwave-flash
- Adobe Flash.
- application/x-silverlight
- Microsoft Silverlight.
- application/zip
- ZIP files.
image
- image/png
- The most common type of image.
- image/svg
- SVG images, which are not taken by cameras, but are created using geometric shapes. As such, they are not a concern for most who wish to avoid problematic images online.
- image/vnd.microsoft.icon
- The type for the little images that appear in browser tabs and bookmarks.
text
- text/css
- Stylesheets on web pages.
- text/html
- Normal web pages.
- text/plain
- Plain text (not too common on the web).
audio / video
- audio/mpeg
- MP3 files.
- video/mp4
- MP4 video files.
Finding a media type
You can determine the media type of a particular file using the mety command:
pluck mety foo.txt # prints foo.txt -> text/plain
More media types
- The MDN Web Docs have a longer list of common media types, which they refer to as MIME types.
- Wikipedia has an article about media types.
Last updated: 2022-08-16