DevToolsmith

TIFF MIME Type

image/tiff is the MIME type for TIFF images. Here is the Content-Type header to send, the file signature, and how to configure servers and code.

MIME type
image/tiff
Extensions
.tiff, .tif
Content-Type header
image/tiff
Registered
Yes, with IANA
Compress with gzip
No, it is already compressed
Category
Images

About TIFF image files

Common in scanning, printing and photography, and used for multi-page scanned documents. Only Safari can display TIFF, so convert it to PNG, JPEG or PDF before showing it on a web page.

File signature

TIFF files start with 49 49 2A 00 ("II*", little-endian) or 4D 4D 00 2A ("MM", big-endian). The extension and the type a browser reports for an upload both come from the file name, so check these bytes on the server before trusting a file.

Serve .tiff with the right Content-Type

Response header
Content-Type: image/tiff
nginx (a line in the types { } block of mime.types)
image/tiff tiff tif;
Apache (.htaccess or server config)
AddType image/tiff .tiff .tif
Caddy
@tiff path *.tiff *.tif
header @tiff Content-Type "image/tiff"
Check what a server sends
curl -sI https://example.com/file.tiff | grep -i '^content-type'
# Content-Type: image/tiff

Set the type in code

Node.js (Express)
res.set('Content-Type', 'image/tiff');
// Or make the browser download it:
res.attachment('file.tiff');
Python
import mimetypes

mimetypes.add_type('image/tiff', '.tiff')  # if your system doesn't know it
mimetypes.guess_type('file.tiff')[0]  # 'image/tiff'
Go
mime.AddExtensionType(".tiff", "image/tiff")
w.Header().Set("Content-Type", "image/tiff")

Accept .tiff uploads

HTML
<input type="file" accept=".tiff,.tif,image/tiff">

The accept attribute only filters the file picker; users can still choose another file. Listing the extension as well as the type matters, because operating systems don’t always report the type you expect.

Related types

  • .png (image/png): PNG image
  • .pdf (application/pdf): PDF document
  • .jpg (image/jpeg): JPEG image

More images

.gif , .webp , .avif , .heic , .ico , .bmp . Look up any extension or type with the MIME type lookup.

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What is the MIME type for .tiff files?

image/tiff. The full header is "Content-Type: image/tiff".

Why does my server send the wrong Content-Type for .tiff?

Web servers pick the type from the file extension using a table (mime.types in nginx and Apache). If .tiff is missing from that table, they send a default such as application/octet-stream or text/plain. Add the mapping as shown on this page, then check the response with "curl -sI".

How can I check that a file really is TIFF?

Look at the first bytes rather than the extension or the type the browser reports, which both come from the file name. TIFF files start with 49 49 2A 00 ("II*", little-endian) or 4D 4D 00 2A ("MM", big-endian). The MIME type lookup on this site reads them for you when you drop a file on it.