What is the APNG File Format?

Animated PNG, or APNG, extends PNG with multiple frames, frame timing, and looping. It retains full-color pixels and alpha transparency rather than using GIF’s restricted palette model.

How the APNG File Format works

Animated PNG began as a Mozilla extension and became part of the official PNG specification with its Third Edition, a W3C Recommendation since June 2025. An APNG stream is a normal PNG stream plus three chunk types: acTL declares the animation and gives the frame count and number of plays (0 means loop indefinitely), fcTL describes one frame, and fdAT carries frame data in the same form as IDAT with a sequence number in front. Every frame is losslessly compressed and uses the same bit depth, color type, and palette as the static image, so an APNG can be truecolor with full alpha or palette-based. A frame may cover only part of the canvas: its fcTL chunk gives a width, height, and offset inside the image dimensions.

Key facts

  1. An APNG cannot be told from a PNG by its signature or, in practice, its name. Both start with the same eight bytes, and although image/apng and .apng are registered, MDN lists .png as an APNG extension too. What marks a file as animated is an acTL chunk before the first IDAT chunk. To find it, walk the chunks after the signature: each starts with a four-byte data length and a four-byte type, followed by the data and a four-byte CRC.
  2. A decoder without APNG support ignores the animation chunks and shows the static image. That image is the first animation frame only when a fcTL chunk precedes IDAT; otherwise it is not part of the animation at all. The PNG specification warns that a file can pair an unrelated static image with its animation and that this could be used to bypass moderation, so review or thumbnail the animation frames, not only the static image.
  3. Frames are instructions for updating a canvas, not always complete pictures. Each fcTL chunk sets dispose_op (leave the region, clear it to transparent black, or restore the previous contents) and blend_op (replace the region or alpha-composite over it). A tool that copies a frame’s data out as a standalone image, or re-encodes frames, without applying these rules can output partial or wrongly composited images. Delays are fractions of a second (delay_num over delay_den, with a zero denominator read as 100); a zero numerator asks for the next frame as fast as possible, and viewers may impose a lower bound.
  4. Reading every frame is often opt-in. ImageMagick’s format list says an APNG must be read with an explicit apng: prefix, otherwise it “assumes a PNG image and only reads the first frame”, and that ffmpeg must be on the path. Read as a plain PNG, the file yields its static image under the PNG specification, so that “first frame” is not necessarily part of the animation. sharp has an open feature request for APNG and a user report that only the first frame was resized. FFmpeg’s APNG demuxer ignores the file’s loop count by default (-ignore_loop), and its muxer sets repetition with -plays, where 0 loops forever.

When the APNG File Format matters

Use APNG for short interface animations, stickers, and loading indicators that need 24-bit color or an 8-bit alpha channel, which GIF’s 8-bit indexed color and single transparent color index cannot provide. APNG is lossless only, so expect large files for photographic or long animations; MDN’s format guide rates AVIF and WebP as better performing but less broadly supported. Current Chrome, Edge, Firefox, Opera, and Safari display APNG, and software without APNG support shows the file’s static image instead.

How Transloadit helps with the APNG File Format

Transloadit’s image formats table lists APNG as a format that its ImageMagick-based Robots, including /image/resize, can read and write, and its audio/video formats table lists an apng format that FFmpeg-based Robots such as /video/encode can read and write.

The tables report what each stack can read and write, not whether animation survives a given Step. The /image/resize documentation describes its frame and flatten parameters only for animated GIF and does not say how an APNG named .png is treated. No Assembly was run for this entry, so run a representative APNG through yours and check the frame count of the result.

Explore Transloadit’s file formats & compression capabilities

Sources

Turn media knowledge into a working pipeline

Connect uploads, processing, AI, storage, and delivery through one declarative API — with the encoding stack, scaling, and format churn handled for you.

Try Transloadit for free