image/x-tga

The MIME type for Targa image data. The top-level type image declares a still image; the subtype names the format.

The x- prefix marks an unregistered type, a convention from before IANA registration was common. Software has used it for so long that it is effectively standard, and some formats have both an x- form and a later registered form in circulation.

Format with this MIME type

  • TGA · Targa image data · .tgaSignature 54 52 55 45 56 49 53 49 4F 4E 2D 58 46 49 4C 45 2E 00 (TRUEVISION-XFILE.) · details

Where the MIME type comes from, and why it can be wrong

A MIME type is a label attached by whoever sends the file: a web server picks it from the file extension, an email client from the attachment name, an upload form from whatever the browser guessed. None of them read the content. A renamed file, a misconfigured server, or a deliberate disguise all produce a confident, wrong label.

To see what a server actually sends, and then what the file actually is:

# The declared type, from the HTTP headers
curl -sI https://example.com/file.tga | grep -i content-type

# The real type, from the bytes (macOS and Linux)
file --mime-type file.tga

Or drop the file on our detector, which reports the type the bytes support and the MIME type that goes with it, without uploading anything.

Setting it correctly on a server

# Nginx (mime.types or a location block)
types { image/x-tga tga; }

# Apache (.htaccess)
AddType image/x-tga .tga

# Any HTTP response
Content-Type: image/x-tga