File Conversion

Batch Converting a Folder of Images to WebP for a Site Migration

Batch Converting a Folder of Images to WebP for a Site Migration

A site migration or redesign is a natural moment to also address years of accumulated image bloat — old JPGs and PNGs uploaded at whatever size and quality happened to be convenient at the time, never revisited since. Converting the whole library to WebP as part of the migration, rather than carrying the old files forward unchanged, is one of the more effective performance improvements available for relatively little extra effort at exactly the point you are already touching everything else.

Why a migration is the right moment to do this

Outside of a migration, going back through years of existing images to convert and re-upload them is a disruptive, easy-to-defer task on a live site. During a migration, you are already moving every piece of content to a new platform, which means the images are already being touched, checked and re-uploaded regardless — converting them to a better format at the same time adds relatively little extra work to a process that is happening anyway.

General approach

  1. Export or gather the full set of images from the old site, organised by page or section if the platform allows it.
  2. Convert JPGs with JPG to WebP and PNGs with PNG to WebP, keeping the two separate since they need different source-format tools.
  3. Spot-check a sample of the converted images against their originals before committing to the full batch.
  4. Upload the converted WebP files to the new platform, updating any references or links as part of the migration process.

Deciding whether every image needs converting

Not every image benefits equally — a large, detailed photo gains the most from converting to WebP, while a tiny icon or a simple graphic may see a smaller absolute saving even if the percentage reduction looks similar. If the migration is time-constrained, prioritise the largest, most-viewed images first (hero images, top landing pages) rather than trying to convert every single image on the site with equal urgency.

Keeping a fallback plan for platform or browser compatibility

Before committing entirely to WebP across the whole site, confirm the new platform and its themes or templates properly support WebP display, since older or more obscure platform components occasionally still expect JPG or PNG specifically. If there is any doubt, keep the original JPG or PNG files archived (not necessarily live on the site, but accessible) during and after the migration, in case a specific fallback is needed.

Handling images with transparency separately

PNGs with a transparent background convert to WebP while keeping that transparency intact, which is one of WebP's genuine advantages over JPG for this kind of content. Handle these the same way as any other PNG-to-WebP conversion, but it is worth specifically checking a few transparent images after conversion to confirm the transparency survived, following the general check described in our guide to keeping transparency intact.

Coordinating the conversion with whoever is handling the technical migration

If someone else is handling the technical side of the platform migration itself, coordinate the timing of the image conversion with them rather than working entirely separately — converting and re-uploading images before the new platform's content structure is finalised can mean redoing some of that work if paths or organisation change partway through. A short conversation upfront about when in the migration timeline the image conversion should happen avoids duplicated effort on both sides.

Updating references, not just the files themselves

Converting the image files is only half the task — every place on the site that references the old file by name or path needs updating to point to the new WebP version, unless your migration process handles this automatically. Missing a reference update is a common, easy-to-overlook cause of broken images appearing on an otherwise successful migration, so it is worth a dedicated check across the migrated site specifically for this.

Measuring the improvement once the migration is live

After the migration, compare total page weight and load time on a few representative pages against what the old site measured, using your browser's own developer tools or a page-speed testing service. Seeing a concrete before-and-after number is a useful confirmation that the conversion effort actually achieved something, and it is a good data point to have on hand if anyone later asks what the migration improved beyond the platform change itself.

Deciding whether to also resize dimensions during the same pass

A migration is also a natural point to check whether any images are carrying far more pixel resolution than they are ever displayed at, not just the wrong format. If you find images uploaded at several times their actual display size, resizing them down to something closer to their real display dimensions, alongside the format conversion, compounds the size saving considerably beyond what changing format alone would achieve, and it is very little extra work to check for this while you are already handling every image individually.

Frequently asked questions

Should I convert every image, or just the largest ones?

If time allows, converting everything is more thorough; if constrained, prioritise the largest and most-viewed images first for the best return on effort.

Will converting to WebP break any existing image links?

Only if references to the old filenames are not updated; plan the conversion and reference update together rather than as separate, disconnected steps.

Do I need to keep the original JPG and PNG files after converting?

It is a reasonable precaution to archive them, even if not kept live on the site, in case a specific compatibility issue requires falling back to the original format.

Is there a risk of visible quality loss converting a whole library at once?

At a reasonable quality setting, generally no meaningful visible difference; spot-checking a sample before committing to the full batch catches any exceptions.

Does this matter for a small site with only a handful of images?

The benefit scales with the number and size of images; a small site sees a smaller total improvement, but there is little downside to doing it during a migration regardless of scale.

Can I convert images in bulk, or do I need to do this one at a time?

Uploading multiple files together rather than one at a time speeds up the process considerably for a large image library.

Is the tool free and private?

Yes. No sign-up, no watermark, and files are removed from the server automatically about an hour after processing.

Related guides

← Back to all posts

Keep reading