JPG/JPEG
Joint Photographic Experts Group
MIME type: image/jpeg
JPEG is the most widely used lossy image compression format, particularly for photographs. It achieves significant file size reduction by discarding visual information that the human eye is less sensitive to.
Advantages
- +Excellent compression for photographs
- +Universal support across all platforms
- +Adjustable quality/size tradeoff
- +Small file sizes for web use
Limitations
- -Lossy — quality degrades with each save
- -No transparency support
- -Artifacts visible at low quality settings
- -Not ideal for text, logos, or sharp edges
Common Use Cases
Technical Details
JPEG compression works by converting the image from RGB to YCbCr color space, downsampling the chrominance channels, applying a Discrete Cosine Transform (DCT) to 8×8 pixel blocks, quantizing the DCT coefficients (this is the lossy step), and applying Huffman or arithmetic coding. Quality settings typically range from 1-100, with 75-85 being the sweet spot for web use.
Frequently Asked Questions
What is the difference between JPG and JPEG?
There is no difference. JPG and JPEG are the same format. The .jpg extension exists because older Windows systems only supported 3-character extensions. Modern systems use both interchangeably.
What quality should I save JPEGs at?
For web use, 75-85% quality offers the best balance of file size and visual quality. Below 60% artifacts become noticeable. For archival, use 95-100% or switch to PNG for lossless.