DEV Community

zjch022
zjch022

Posted on

How to Batch Convert PNG to WebP for a Whole Blog Post (Free, No Upload)

Converting one PNG to WebP is trivial. Converting the eleven images in your finished blog post — without losing track of which one is which — is where most people give up and ship PNGs everywhere. I've been there. I'm the developer of FileOnTap, and I built the converter I describe below partly because I was tired of doing this image by image for every post.

This is the batch workflow I actually use now. It takes about ten minutes for a typical post.

Step 1: Collect and rename first, convert second

Before touching any converter, gather every PNG for the post into one folder and give each file a final, web-friendly name: lowercase, hyphens, descriptive. hero-1200.webp won't exist yet, but hero-1200.png is your source of truth. Naming first matters because WebP files inherit the name you give the PNG — rename after conversion and you'll be grepping through your markdown for broken references.

A naming pattern that has served me well: {topic}-{role}-{width}.png, e.g. webp-guide-hero-1200.png, webp-guide-diagram-800.png.

Step 2: Convert in one sitting, one tool

Open a free PNG to WebP converter that processes files locally in your browser — no upload means your unpublished screenshots never touch someone else's server, and a batch of a dozen images converts in seconds rather than waiting on a queue. Drop the whole folder's worth of files in, download the WebP versions back into the same folder so the PNG originals and WebP outputs sit side by side during review.

Step 3: Spot-check three things before you publish

Don't trust a batch blindly. Check: (1) text legibility — open the WebP at 100% zoom and read any text in screenshots; (2) transparency — if the source PNG had an alpha channel, confirm the WebP kept it; (3) file size — compare each pair in your file manager. In my runs, the WebP comes out dramatically smaller than the PNG while looking identical at normal zoom, but exactly how much smaller depends on the image — a flat UI screenshot compresses far better than a noisy photograph, so check each file rather than assuming a fixed ratio.

Step 4: Swap references, then verify on the live page

Replace the image references in your post (keep the PNG originals in the folder for a week as backup), then load the published page on a phone over mobile data. This is the check most people skip: your local machine hides slow images, but a 4G connection doesn't. If the page feels snappy and every image renders, delete the backup PNGs — or keep them in an archive/ subfolder if you're cautious.

Why bother? The honest version

WebP won't fix a slow theme, a heavy ad stack, or unoptimized video embeds. What it does fix is the most common self-inflicted wound in blogging: shipping multi-megabyte screenshots when nobody can see the difference. For image-heavy posts, the conversion step is the highest-leverage ten minutes in the publishing process.

For quick one-off conversions I use the same browser-local flow: convert PNG to WebP without uploading — drop the file in, get the WebP back, nothing leaves your device.

Top comments (0)