MIME Types

image/png

The MIME type for PNG (Portable Network Graphics) image files with lossless compression.

What Is This?

The image/png MIME type indicates that the content is a PNG (Portable Network Graphics) image. PNG supports lossless compression, transparency (alpha channel), and is widely used for graphics, logos, screenshots, and images requiring sharp edges or transparency. Unlike JPEG, PNG does not introduce compression artifacts.

Common Uses

1

Common Use

Logos and icons requiring transparency

2

Common Use

Screenshots and UI mockups

3

Common Use

Graphics with sharp edges, text, and solid colors

4

Common Use

Images that need lossless quality preservation

Examples

Server Configuration

Serve files with the image/png MIME type:

# Nginx
location ~ \.png$ {
  add_header Content-Type "image/png";
}

# Apache
AddType image/png .png
HTML Usage

Use this MIME type in HTML or HTTP:

Content-Type: image/png

<!-- HTML reference -->
<link rel="preload" href="file.png" as="fetch" crossorigin>

Related Entries

More from this reference:

Frequently Asked Questions

When should I use PNG instead of JPEG?

Use PNG for images with text, sharp edges, transparency, or areas of solid color (screenshots, logos, icons). Use JPEG for photographs and images with smooth gradients where some quality loss is acceptable for smaller file sizes.

Does PNG support animation?

Yes, but not natively in all browsers. APNG (Animated PNG) is supported in most modern browsers but is less common than GIF for animations. For animated content, consider using GIF or video formats instead.