Bulk image WebP conversion
How to convert your entire media library to WebP and confirm every image renders correctly
WebP images are 25-35% smaller than JPEG or PNG at equivalent visual quality. On a site with 400 images, converting to WebP can remove 40-80 MB from the total page weight across the site — that is a measurable improvement in load time without changing a single page layout or line of copy.
SGEN's media library has a built-in bulk optimization tool that converts uploaded images to WebP, applies compression, and updates all references to the converted files. This recipe walks through the full sequence: setting the conversion defaults, batching large libraries, verifying the output, and knowing when manual intervention is needed.
What is this for?
Use this recipe when:
- You have an existing media library with JPEG or PNG images uploaded before WebP conversion was enabled.
- You are completing a migration and the source platform exported original-format images.
- A performance audit (Lighthouse, PageSpeed Insights, or SGEN's SEO health panel) flags image formats as a performance opportunity.
- You are preparing for a launch and want to clear performance debt before the site goes live.
SGEN converts new uploads to WebP automatically when the WebP setting is toggled on in Media settings. This recipe covers the retroactive conversion of images already in the library — the ones uploaded before the toggle was on.
Good use cases
Post-migration library cleanup. Migrations from WordPress or Shopify export images in original format (JPEG, PNG, sometimes BMP). After the import, the SGEN media library contains hundreds of pre-WebP images. Bulk conversion cleans the library in one session.
Pre-launch performance pass. Before a site launch, a Lighthouse audit shows "Serve images in next-gen formats" as a high-impact opportunity. Bulk WebP conversion is often the fastest resolution — operator-doable in under an hour for libraries under 500 images.
Agency or site manager maintaining multiple sites. If you manage several SGEN sites, each site's media library may have drifted from the optimization baseline. Run this recipe per site on a quarterly schedule.
After a media import. You bulk-imported images using the media import tool (for product photography, event photos, or content assets). Those imports arrive in original format. Run WebP conversion after the import settles.
What NOT to use this for
- Logo and brand mark files. SVG logos do not benefit from WebP conversion — they are already vector-optimized. PNG logos with transparency sometimes exhibit banding artifacts after lossy WebP compression. Convert these manually with quality set to lossless rather than including them in a bulk lossy pass.
- Images where exact color accuracy is critical. Product photography for color-sensitive products (paint, fabric, cosmetics) may show subtle color shift under lossy compression. Test a representative sample before bulk-converting the full product image set.
- Images already in WebP format. The bulk tool skips files already in WebP — no action needed. But if you see images labeled
.webpin the library, confirm they were converted at the quality level your site requires (see the quality setting in step 2). - Converting outside SGEN. Do not convert images using an external tool and re-upload them — the media library's reference tracking will treat them as new files, breaking any pages that reference the original file ID. Use the built-in conversion tool to keep references intact.
How this connects to other features
- Media library — the full media library reference. Covers upload, organize, delete, and the optimize tool used in this recipe.
- Performance and caching overview — explains how SGEN serves optimized images via the CDN and why WebP delivery depends on browser support detection at the CDN layer.
- SEO health — the performance tab of the SEO health panel surfaces image format issues as a scored item. Running this recipe should clear or improve that score.
- Brand kit — for logo and favicon assets specifically. Handle those separately from the bulk conversion pass.
Before you start
Check available disk quota before converting. WebP conversion is done in-place (the original is replaced or archived), but during processing SGEN may hold both versions temporarily. For libraries over 1 GB, confirm you have sufficient quota headroom. Go to SG-Admin → Settings → Storage to see current usage.
Download a backup of the media library first. For libraries with more than 200 images, take a full backup (see the pre-migration backup recipe) before bulk converting. Original files are archived rather than deleted, but the archive access policy may have a retention window.
Note the current media count and total size. In SG-Admin → Media, note the total file count and the storage usage figure. After conversion, you will compare these to confirm the operation completed correctly and measure the size reduction.
Identify any exemption categories. Before running the batch, tag or move any images you want to exclude from conversion (brand marks, color-critical product shots) into a folder you can exclude from the bulk operation. SGEN's bulk tool supports folder-scoped and tag-scoped batches.
Confirm WebP delivery is enabled at the CDN layer. WebP files in the media library are only served to browsers that support WebP — the CDN negotiates format via the Accept header. This is on by default in SGEN, but confirm under Settings → Performance → Image delivery that WebP serving is enabled. Converting to WebP without CDN-level serving means the files are smaller on disk but still served as their original format to browsers.
Where to go
Open SG-Admin → Media. In the top toolbar, click Optimize. This opens the bulk optimization panel with format conversion options. Alternatively, navigate to SG-Admin → Settings → Media to set the global conversion defaults that apply to new uploads and to trigger a retroactive batch.
Steps — Convert the full media library to WebP
1. Open the media optimization settings
Go to SG-Admin → Settings → Media. Under Image format, set the following before running any conversion:
- Format for new uploads: WebP — this ensures all future uploads auto-convert.
- Compression level: Lossy, quality 82 — this setting balances visual quality against file size. Quality 82 is a broadly accepted balance for web images; it produces files 25-35% smaller than JPEG at quality 85 with no visible degradation for most content. For color-critical images, use quality 90 or lossless.
- Preserve originals: On — during the batch, SGEN archives the original files. Keep this on so you have a fallback if any conversion produces a visible artifact.
2. Scope the batch — folder-first for large libraries
For libraries under 200 images, run a single full-library batch. For libraries over 200 images, batch by folder to keep the processing manageable and to make it easier to identify any folder where conversions produced unexpected results.
In SG-Admin → Media → Optimize, use the Scope selector to pick a folder. Start with your largest folder (typically product images or blog post images). Run that batch, verify, then proceed to the next folder.
Batching also makes the quality-check step (step 4) tractable. Spot-checking 50 images per batch is faster and more reliable than spot-checking 500 images at the end of a single run.
3. Run the conversion batch
With the scope set, click Convert to WebP. The progress panel shows:
- Queued: total images in scope that are not already WebP.
- Processing: the current image being converted.
- Complete: images converted successfully.
- Skipped: images already in WebP or in non-applicable formats (SVG, GIF with animation, PDF).
- Failed: images that could not be converted (usually corrupted source files or files with invalid metadata).
Leave the tab open during the conversion. Navigating away from the optimize panel does not stop the batch — it continues in the background — but the progress display will not update until you return.
For a library of 400 JPEG/PNG images, expect 5-15 minutes depending on image dimensions and server load.
4. Spot-check the conversion quality
After the batch completes, open 10-15 converted images across different content types (hero images, product photos, editorial photos, icons) and confirm:
- The image renders correctly — no visible color shift, banding, or artifact blocks.
- The file size is smaller than the original — the conversion log shows before/after sizes. If a converted file is the same size or larger, the original may already have been well-compressed (or the source was already WebP-like in compression ratio).
- The image appears correctly on public pages — open three or four pages that use converted images and confirm they display as expected.
For color-critical images (product photography in color-sensitive categories), compare the converted and original versions side by side. If you see visible color shift, re-convert those images at quality 90 or lossless using the single-image override in the media library.
5. Check and clear any failed conversions
Failed conversions appear in the batch log with an error code. Common failure reasons:
- Corrupted source file. The original JPEG or PNG is damaged. Download the original, confirm it opens correctly in an image editor, re-export it cleanly, re-upload to the media library, and re-run conversion on that file.
- Invalid EXIF metadata. Some files exported from older cameras or stock image sources carry non-standard EXIF blocks that the conversion tool cannot parse. Strip EXIF metadata using an image editor, re-upload, and retry.
- File too large for single-pass conversion. Very large source files (over 20 MB) may exceed the per-image processing limit. Convert these manually using an external tool and re-upload — but note that re-uploading creates a new file ID. Update any page references manually.
For a typical library, expect 0-2 failed conversions. More than 5 failures suggests a systematic issue with the source images or the library import — investigate before proceeding.
6. Confirm total size reduction and update the storage record
After all batches complete, go to SG-Admin → Settings → Storage and note the new total media library size. Compare to the pre-conversion figure you noted in the "Before you start" step.
A successful full-library WebP conversion of a JPEG/PNG library should show 25-40% total size reduction. If the reduction is less than 10%, many images may have already been heavily compressed, or a significant portion of the library was already WebP.
Record the before/after figures in your site documentation — this is useful for Lighthouse audit comparisons and for demonstrating the performance improvement to stakeholders.
What success looks like
- Every image in the scoped folders shows Complete status in the conversion log.
- Spot-check passes: no visible artifacts, correct colors, images render on public pages.
- Total media library size is 25-40% smaller than before conversion.
- New uploads auto-convert to WebP (confirmed by uploading a test JPEG after the batch).
- The performance tab of SEO health no longer flags image format as a high-impact opportunity.
What to do if it does not work
Conversion runs but images on public pages still show as JPEG in DevTools. The CDN is serving the cached JPEG version. The CDN cache has not invalidated since the conversion. Go to SG-Admin → Settings → Performance → Cache and click Purge image cache. After the purge, DevTools should show image/webp as the content type for converted images.
Converted images show visible color banding on product photos. The lossy compression at quality 82 is too aggressive for those images. In the media library, select the affected images, and re-convert at quality 90 or lossless (single-image conversion in the image edit panel). This overrides the batch setting for those specific files.
Batch stops partway through with no error shown. A browser tab that went to sleep (common in mobile browsers or after a long idle period) may have interrupted the progress display — the background job continues, but the UI stops updating. Reload the optimize panel; the batch status should show the current state. If the batch genuinely stopped, resume from the last confirmed folder by scoping the next batch to the remaining folders.
Storage usage increased after conversion. If originals are being preserved, the library temporarily holds both versions. The size should decrease once originals are purged (typically after a 30-day archive window). Check Settings → Storage → Archive to see the archived original size separately.
A converted image breaks a page layout. In rare cases, a converted image may have had its dimensions metadata stripped during conversion, causing the browser to size it incorrectly. In the media library, open the image and confirm dimensions are shown correctly. If not, re-upload the original and re-convert.
Reference — WebP quality settings guide
Choosing the right compression quality affects both file size and visual fidelity. Use this table to pick the right setting per image category:
| Image category | Recommended quality | Rationale |
|---|---|---|
| Hero images, banners | Lossy 82-85 | Large files; 82 delivers strong size reduction with no visible artifact at screen resolution |
| Editorial photos (blog, news) | Lossy 80-82 | Similar to hero — visitors view at screen resolution, not print |
| Product photography (standard) | Lossy 85-88 | Slightly higher quality to preserve product detail |
| Product photography (color-critical) | Lossy 90 or lossless | Cosmetics, paint, fabric — hue accuracy is part of the product |
| Thumbnails and preview images | Lossy 75-80 | Small display size; aggressive compression acceptable |
| PNG icons and UI elements | Lossless | These contain hard edges and flat colors that artifact badly under lossy |
| SVG (logos, illustrations) | Not applicable | SVG is already vector; WebP conversion does not apply |
| Animated GIF | Not applicable | Convert to WebM/MP4 video instead of WebP for animation |
Reference — Expected size reduction by image type
Use these benchmarks to validate your conversion results. If your actual reduction is significantly outside these ranges, investigate before moving on.
| Source format | Typical size reduction to WebP | Notes |
|---|---|---|
| JPEG (camera-original, quality 95+) | 35-50% | High-quality originals compress well |
| JPEG (web-optimized, quality 75-85) | 15-25% | Already compressed; less headroom |
| PNG (flat color, icons, logos) | 10-40% (lossless) | Depends on color count and transparency |
| PNG (photography in PNG) | 50-70% (lossy) | PNG photography is rarely optimized; large gains |
| BMP | 60-80% | Virtually no compression in source |
If your reduction is less than 10%: The source images may already be heavily compressed (common with stock photos downloaded at "web" quality) or may already be in WebP format.
If your reduction is more than 70%: The source images were likely uncompressed originals (camera raw exports, BMP, or TIFF). This is a valid and large win — confirm visual quality is acceptable before celebrating.
Anti-patterns to avoid
Converting logos with transparency at lossy quality. Lossy WebP on PNG logos with alpha transparency can produce fringing artifacts around the transparent edges. Convert logos with the lossless option or leave them as SVG.
Running the bulk conversion without the originals archive on. If you convert without preserving originals and discover a quality issue three months later, you have no fallback. The archive adds temporary storage overhead but is always worth it for the first 30-90 days after conversion.
Uploading WebP files from an external tool. Externally converted WebP re-uploads create new file IDs in the media library. Any page that referenced the original file ID now has a broken image reference. Always use SGEN's built-in conversion to keep references intact.
Treating conversion as a one-time task. New images uploaded without WebP auto-conversion enabled (Settings → Media → Format for new uploads) will arrive in original format. Confirm the auto-conversion toggle is on so the library does not drift back over time.
Reference — WebP operator FAQ
Does WebP work in all browsers? WebP is supported in all modern browsers — Chrome, Firefox, Safari (since version 14), Edge, and Opera. SGEN's CDN serves WebP when the browser's Accept header includes image/webp, and falls back to the original format for browsers that do not support it. This means you can convert your entire library to WebP without worrying about older browser compatibility — SGEN handles the format negotiation.
Will converting to WebP affect my image URLs? No. SGEN's in-place conversion keeps the same file reference in the media library. Pages that use the image continue to reference the same ID. The CDN serves WebP to supporting browsers and the fallback format to others, both from the same URL.
Can I revert a converted image to its original format? Yes, if you had "Preserve originals" enabled during the batch. In the media library, open the image and look for "Restore original" in the image actions. This replaces the WebP version with the archived original. If originals were not preserved, the WebP is the only version.
What happens to animated GIFs during the bulk conversion? Animated GIFs are skipped by the WebP bulk conversion tool — SGEN does not convert them because WebP animation has limited browser support compared to the alternatives. For animated content, consider converting GIFs to WebM or MP4 video, which have better compression ratios and broader support.
Does WebP conversion affect Lighthouse or PageSpeed scores? Yes — positively. The "Serve images in next-gen formats" audit in Lighthouse is directly addressed by WebP conversion. After a full library conversion and CDN cache purge, this audit typically moves from a red/orange flag to a pass. The actual performance improvement depends on how many images are on the audited page and their original sizes.
Can I bulk-convert images in a specific folder only? Yes. In the Optimize panel, use the Scope selector to pick a specific media folder before starting the batch. Only images in that folder are included in the conversion run. This is the recommended approach for large libraries.
How long should I keep the archived originals before deleting them? 30 days minimum after a successful batch conversion with a clean spot-check. 90 days if any images were flagged for quality concerns during the spot-check. After the archive window, go to Settings → Storage → Archive and purge the originals to recover the storage space they occupy.
Reference — Media library maintenance after conversion
Once the initial batch is done, the media library needs light ongoing maintenance to stay optimized as new content is added.
Ongoing upload discipline:
- Confirm Settings → Media → Format for new uploads is set to WebP before every new upload session.
- When importing a batch of images from a photographer or agency, check their delivery format. If they delivered JPEG or PNG, run a folder-scoped WebP conversion immediately after import rather than letting it accumulate.
- For product photography batches, set the quality override before the batch runs — do not wait until after and spot-check fails.
When to re-run a partial batch:
- If the conversion log shows failed files, address the failures and re-run scoped to the failed-only set (export the failure list, filter the media library to those files, and run the optimizer with that folder scope).
- If new images in a folder were uploaded after a batch, run a scoped batch for that folder to catch the additions.
- If the quality setting was changed after a batch ran, re-running the batch converts images already done at the new quality setting — only do this intentionally.
Media library hygiene in parallel:
WebP conversion is also a good time to run a general media library audit:
- Remove images with zero page references (not attached to any page, post, or product). The media library's filter "unattached" surfaces these.
- Deduplicate images that were uploaded more than once under slightly different names (a common result of migrations).
- Organize images into folders by content type (products, blog, team, marketing) if they are currently flat in the root folder. Organized folders make future scoped batches easier to run.
Reference — Connecting WebP conversion to Lighthouse scores
A Lighthouse audit measures several image-related metrics. Here is how the WebP conversion maps to each:
| Lighthouse audit | Before WebP conversion | After WebP conversion |
|---|---|---|
| Serve images in next-gen formats | Flag (red/orange) | Pass (green) — primary improvement |
| Efficiently encode images | Flag if originals were uncompressed | Pass if lossy quality is applied |
| Defer offscreen images | Not affected by format change | Still requires lazy-load implementation |
| Properly size images | Not affected by format change | Separate optimization — see responsive images |
| Total Byte Weight | Reduced by 25-50% for image portion | Score improves proportionally |
The "Serve images in next-gen formats" audit is the direct target of this recipe. The others require separate interventions. After running this recipe, re-run a Lighthouse audit on your highest-traffic pages and compare the score to the pre-conversion baseline you noted before starting.
Related resources
- Media library — the full media panel reference. Covers the optimize tool, folder management, and the archive / restore controls used in this recipe.
- Performance and caching overview — how SGEN serves images via CDN, how WebP format negotiation works at the CDN layer, and how the caching layers interact with image optimization.
- SEO health — after running this recipe, re-check the performance tab of the SEO health panel. The image format score should improve or clear.
- Brand kit — logo and favicon assets require separate treatment (lossless WebP or SVG). Do not include brand marks in the bulk lossy conversion pass.
Checklist — WebP conversion complete
Use this to confirm all steps before closing the conversion session:
- [ ] Storage quota checked — sufficient headroom before the batch.
- [ ] Backup taken — pre-conversion snapshot confirmed.
- [ ] CDN WebP delivery confirmed as enabled in Settings → Performance.
- [ ] Exemption images moved or tagged out of scope.
- [ ] Conversion settings: Format = WebP, Compression = Lossy quality 82, Preserve originals = On.
- [ ] Batch run — all folders covered.
- [ ] Failed conversions reviewed and resolved.
- [ ] Spot-check of 10-15 images — no visible artifact or color shift.
- [ ] Total size reduction noted (before/after figures recorded).
- [ ] Auto-convert for new uploads confirmed enabled.
All ten items checked: the media library is optimized, the originals are archived with a fallback window, and future uploads will stay in WebP automatically.
Frequently asked questions
Will WebP images look different to my visitors? Not in any meaningful way at quality 82. WebP at quality 82 is visually equivalent to JPEG at quality 90 for editorial and product images. Visitors will not notice the format change — only the faster load time.
How does SGEN decide whether to serve WebP or the fallback format? SGEN's CDN checks whether the visitor's browser supports WebP on each image load. If it does, the CDN serves the WebP version. If not, it serves the original format. This happens automatically per browser, invisibly. You do not need to configure it per image.
Do I need to convert images on every subsite separately? Yes. If you manage multiple SGEN sites (for example, separate environments or separate brand sites), each media library is converted independently. The conversion settings and the batch run are per-site, not global.
Is there any SGEN plan restriction on the bulk conversion tool? The media optimization tool is available on all plans that include the Media Library module. Check your plan's feature set if the Optimize panel does not appear — it may be a module that needs to be enabled.
