Blog

Lossless APNG optimization strategies

February 15, 20255 min read
APNGOptimization

You can shrink APNG file size without touching pixel data. Focus on chunk order, deflate level, and frame reuse.

Deflate level

Encode IDAT and fdAT with a higher deflate level (e.g. 9). Build time goes up; bytes go down. For static hosting, the tradeoff is usually worth it.

Frame reuse

If a frame is identical to the previous, use dispose_op 1 and a minimal fdAT (or skip redrawing). Some encoders duplicate full frames; stripping duplicates can save a lot.

Chunk ordering

Place acTL early so decoders know it’s animated. Keep fcTL immediately before its fdAT. Optional chunks (tEXt, etc.) can go after the image data to avoid decoder confusion.

These are all lossless: the decoded pixels stay the same. For further size reduction you’d need lossy steps (e.g. palette reduction or converting to WebP).

Compress APNG

Use our compress tool to reduce APNG size losslessly.

Use our free tools to convert or compress APNG.