What the converter does
The converter takes the images you choose, reads what each one really is from its first bytes, decodes it, scales it down to the maximum width you set when it is wider than that, re-encodes it as PNG, JPEG, WebP and AVIF, verifies its own output and hands you the file; several results download together as one ZIP. Every step runs in this browser tab: the page reads the source bytes, the pixels are drawn to a canvas on your device, and the encoders the browser lacks are fetched from this site’s own /vendor/ directory on first use and run in a web worker beside the page. The source images are not uploaded.
Every figure here is imported from the engine, computed from a fixed, labelled example, or read from the specs registry with its date. The guide Local image conversion explained covers choosing a format for a channel; the methodology documents every rule the tools apply.
The bytes decide, not the file name
An extension is a label somebody typed; the first bytes are what a decoder will meet. So the converter ignores the extension, reads a short prefix and matches it against the signatures below. A match names the format; no match returns nothing and the file is refused whatever it is called. The check runs twice: when files are chosen, where the tool names the refused file, and inside the conversion, where the engine’s own refusal reads The file is not a supported image format.
| Constructed input | detectImageFormat returns |
|---|
| The eight-byte PNG signature | png (PNG) |
| The JPEG start-of-image marker | jpeg (JPEG) |
| A RIFF container whose form type is WEBP | webp (WebP) |
| A GIF89a header | gif (GIF) |
| A BM bitmap header | bmp (BMP) |
| An ftyp box with the brands heic, mif1 | heic (HEIC) |
| An ftyp box with the brands avif, mif1 | avif (AVIF) |
| An ftyp box with only the brand mif1 | heic (HEIC) |
| The opening bytes of an SVG text file renamed to .png | null — refused as unsupported |
HEIC and AVIF share the ISO base-media container, so the engine reads the brand list from the file’s ftyp box: an HEVC brand names HEIC, an AVIF brand names AVIF, and a bare mif1 or msf1 brand with nothing more specific is treated as HEIC. The last row is the case the rule exists for: an SVG or a text file given an image extension is caught before any decoder sees it.
Formats in, formats out
Inputs, as the engine labels them: PNG, JPEG, WebP, GIF, BMP, HEIC and AVIF. Outputs, with the MIME type and the extension the engine writes:
- PNG — image/png, written as .png
- JPEG — image/jpeg, written as .jpg
- WebP — image/webp, written as .webp
- AVIF — image/avif, written as .avif
GIF, BMP and HEICare read but never written; the tool’s own format note says the same. A same-format route — PNG to PNG — is a resize and re-encode, named so that it never replaces the source (the rule is below).
The converter carries no platform figures of its own; those that bear on a setting come from the specs registry with source and date. On width: 1080 pixels is the maximum width Instagram keeps for feed photos (“we make sure to upload it at the best quality resolution possible (up to a width of 1080 pixels).” — source, verified 2026-10-02). On accepted formats, of YouTube thumbnails: “Be uploaded in image formats such as JPG or PNG.” (source, verified 2026-10-02). Check the destination’s own documentation before a launch.
Decoding: the browser for most formats, a bundled decoder for HEIC
For PNG, JPEG, WebP, GIF, BMP and AVIF the browser’s own decoder does the work, through createImageBitmap, with the orientation recorded in the file applied. If the browser cannot decode an AVIF, the error reads This browser cannot decode this AVIF image. Use a current Chrome, Edge, Firefox, or Safari release. because AVIF decoding is the browser’s to provide and the converter substitutes no decoder.
HEIC is the exception: the engine hands the whole file to a HEIF decoder this site serves from /vendor/libheif/ — 1.6 MB, measured from the actual files at build time — running in a worker. A HEIC file can hold more than one image; the decoder takes the primary image and counts the rest, and the count surfaces in the result’s note. Before decoding pixels the worker refuses a primary image above its per-side or megapixel ceiling; the scaled output then passes the same output check as every other source.
Resizing: a maximum width, never an enlargement
One setting controls size: the maximum width. The engine computes a scale factor as the smaller of one and maximum width divided by source width, multiplies both dimensions by it, rounds to whole pixels and keeps at least one pixel each way. Because the factor never exceeds one, the converter never enlarges. On fixed fictional inputs with the maximum width set to 1600: a 4032×3024 photo becomes 1600×1200; a 1200×800 graphic stays 1200×800; a 1080×1920 portrait stays 1080×1920, because the limit applies to width alone.
After scaling, the output’s pixel count is compared with a fixed megapixel ceiling the engine states in its own error message, and an output above it is refused before a canvas is allocated: a memory limit, not a judgement on the image, and lowering the maximum width brings the same source under it. The encoder worker repeats the check and adds a per-side ceiling.
Encoding: four outputs, three encoders
PNG and WebP are encoded by the browser’s canvas encoder: WebP receives the quality as a fraction; PNG receives none, because that encoder takes no quality for PNG — which is why the slider is disabled for that target. JPEG and AVIF go to encoders this site serves itself — MozJPEG from /vendor/mozjpeg/ (0.4 MB) and the AVIF encoder from /vendor/avif/ (3.5 MB), measured from the vendored files at build time — fetched the first time that target is used and kept while the worker lives.
Each receives width, height, the pixel bytes and a fixed option set. The JPEG options ask for a progressive file with optimised coding and chroma subsampling; the AVIF options fix the speed preset, chroma subsampling and bit depth. The slider value is clamped to the engine’s own range first. For a JPEG target the canvas is filled with your background colour before the image is drawn on top, which is what flattens transparency. The engine reads nothing else from the source file for the encoders.
Every worker job runs under a time limit; if a codec exceeds it the worker is stopped and the error names the codec. Cancelling a batch stops the worker the same way; files already converted stay in the list.
Verification, then the file name
An encoder’s output is not taken on its word: the engine reads the new file’s signature through the same detector and requires it to equal the target, or fails with Output verification failed. It then decodes the new file and requires its width and height to match, or fails with Output dimensions failed verification. Only then is a result produced.
The file name follows one rule: keep the stem, replace the extension with the target’s, and if the result would equal the source’s name (case ignored) add -converted, so the source is never overwritten by name. On fixed names: IMG_2041.HEIC to JPEG becomes IMG_2041.jpg; campaign.jpg to WebP becomes campaign.webp; campaign.webp to WebP becomes campaign-converted.webp; no-extension to AVIF becomes no-extension.avif; and exports/spring.launch.png to JPEG becomes spring.launch.jpg, because the folder part is dropped and only the last dot marks the extension.
How to read the result line and its notes
Each converted file shows the detected source format and the target, the output width and height, the source and verified output sizes, and a note when the engine has one. Sizes are measured, not predicted. Three notes exist; two are triggered by format, not content — a point worth stressing, because the notes are easy to misread:
- Animated sources export their first frame. appears for every GIF, WebP and AVIF source. The engine does not inspect whether the file was animated; those containers can hold animation, so a still image gets the same note, meaning only that any further frames are not in the output.
- A note counting additional HEIC images not exported appears when the HEIF decoder found images beyond the primary one, which is the one converted.
- Transparency was flattened onto … followed by the background colour appears for a JPEG target from a PNG, WebP, GIF, HEIC or AVIF source. Again by format: an opaque PNG gets the same note, because the canvas was filled before drawing regardless, and there the fill changes nothing visible.
Where it stops
- It does not enlarge, crop, rotate on request or retouch: one width setting, one quality setting, one background colour for JPEG.
- Outputs are the four above. GIF, BMP and HEIC cannot be written; an animated source keeps its first frame only.
- An output above the megapixel ceiling is refused with a message, not downscaled silently; lower the maximum width and run it again.
- The source images are not uploaded. The files, the canvas and the encoders are on your device; the conversion’s only network requests are this site serving its own codec files.
For choosing one output over another, read Local image conversion explained; for every rule stated from the engine that applies it, the methodology.
Questions
- If I rename a .heic file to .jpg, will the converter treat it as a JPEG?
- No. The format is read from the file's first bytes, so it is detected as HEIC, decoded by the bundled HEIF decoder and, if JPEG is the target, written as a new JPEG: IMG_2041.HEIC becomes IMG_2041.jpg.
- Why does my still WebP say "Animated sources export their first frame."?
- Because the note is attached by source format, not by inspecting the file: every GIF, WebP and AVIF source carries it, since those containers can hold animation. For a still image it changes nothing.
- Why does a PNG-to-JPEG result mention flattened transparency when the PNG was fully opaque?
- For a JPEG target the engine fills the canvas with your background colour before drawing whenever the source format can carry transparency, and the note reports that fill; with no transparent pixels the fill is entirely covered.
- Can the converter make an image larger?
- No. The scale factor is the smaller of one and maximum width divided by source width, so it never exceeds one. In the fixed example above, a 1200×800 graphic with the maximum width set to 1600 comes back 1200×800.
- Why does the first JPEG or AVIF conversion pause before it starts?
- The browser encodes PNG and WebP itself; JPEG and AVIF use encoders this site serves from /vendor/: 0.4 MB for MozJPEG and 3.5 MB for AVIF, measured from the actual files at build time; HEIC input fetches its decoder the same way (1.6 MB). Each is fetched on first use and reused for the batch.
- Why did my file come back with -converted in its name?
- Because the output would otherwise carry the source's own name: campaign.webp to WebP produces campaign-converted.webp, so the source is never overwritten by name, while campaign.jpg to WebP produces campaign.webp, where no clash exists.
- What does "Output verification failed." mean?
- After encoding, the engine reads the new file's signature and requires it to match the target, then decodes it again and requires its dimensions to match. If either fails the conversion is abandoned rather than offering an unverified file; run it again or choose another target.
Everything here runs in your browser: the tools compute on your device and the Studio’s package is assembled on the device. The methodology documents every rule the tools apply.