Getting started with SWPL Media Optimizer
Last updated July 10, 2026
What SWPL Media Optimizer does
This plugin makes sure every new image entering your Media Library arrives at a sensible size. When you upload a photo, or an import brings one in, the plugin checks it at the door: if the image is bigger than your size limit, it is scaled down and compressed before it is stored. Images that are already a reasonable size pass through completely untouched. It works at the source, so oversized files never pile up in the first place – and all processing is local, on your own server, with no cloud service and no credits.
Safe by default. Your existing images – everything already in the Media Library – are never touched by the automatic part of the plugin. The only things that ever change a stored image are the background batch and the “Repair existing library images” tool, and only when you start one yourself. Neither ever alters your original file: for an oversized image the plugin makes a correctly sized working copy and keeps your original beside it, so any run is reversible.
Installation
- Go to Plugins > Add New > Upload Plugin, upload the plugin zip, and click Install Now, then Activate.
- When licensing arrives for your copy, enter your license key where prompted. Until then the plugin runs unlocked.
- That is genuinely it for the everyday feature – optimization of new uploads and imports is on from the moment the plugin is active.
Initial setup
Step 1 – let everyday optimization run (already on)
The defaults – longest side 2,500 pixels, quality 82, camera notes removed – suit almost every store; you rarely need to change them. To see it work, go to Media > Add New Media File, upload a large photo, and look at the Recent activity section on the Settings tab: every image the plugin actually changes is listed with its before-and-after dimensions and file sizes. Images that arrived already within your limits are never listed – the plugin did not touch them, so there is nothing to report. An empty list means your images are arriving in good shape, which is success, not a problem.
Step 2 – look before you change anything (read-only)
Before changing a single file, use the read-only tools to see what you have. Settings tab > “Repair existing library images” > Start dry run: it just counts, then tells you in plain language how many of your existing images are larger than needed and how much disk a live run would save. If you use the video features, the Video tab’s “Measure supplier video sizes” report is the same idea for video.
Step 3 – catch up your existing images
If the dry run found images larger than needed: Settings tab > “Repair existing library images” > Start live repair. This is the deliberate, library-wide pass that generates missing sizes and scales down oversized images, while keeping every original file untouched. It runs gently in the background – you can close the page and come back – and can be cancelled any time. A dry run is an optional preview, not a required gate, because originals are never altered.
Steps 4 and 5 – optional: cloud storage and video
Storing images or videos in Cloudflare R2, migrating existing files there, freeing local disk, owning and compressing supplier videos, and pre-fetching a supplier’s images for WP All Import are all optional, off by default, and covered in the companion article. The golden rule the plugin is built around: do the safe, read-only things first (measure, dry runs), the changing things next (repair, migrate), and the deleting things last and in a small scope – every tool that changes or deletes files is manual, and the riskier ones make you run a dry run first.
Frequently asked questions
I uploaded an image and nothing changed. Is it broken?
Almost certainly not – the image was already within your limits, so the plugin correctly left it alone. To see the plugin visibly act, test with a photo you know is large (say, 4,000 pixels wide), and check Recent activity afterwards. Do not judge size by the filename; right-click the file and check Properties for the true dimensions.
Does it optimize images that imports bring in?
Yes. The plugin guards the doorway into the Media Library, so every image passes through it on the way in – your computer, a supplier feed, or an import of pre-downloaded files alike.
Do I have to run a dry run before a live run?
No. The image batch and the library repair never alter your original file, only a working copy, so you can press the live button straight away; the dry run is purely a preview. The one exception is the storage migration, which copies files to an outside service – its Live button stays off until a dry run has been reviewed.
The page says it “cannot process images on this server”
The plugin needs one of two standard image tools almost every web host provides (Imagick or GD). If neither is available, the plugin switches itself off safely – uploads still work, they just are not optimized. Ask your host to enable the Imagick PHP extension; reload the page and the message disappears on its own.
What gets skipped?
Files already within policy are never touched or rewritten. An attachment whose file is missing or whose metadata is broken is logged and skipped – the plugin never guesses. Vector images such as SVG are counted on their own “not applicable” line: a vector has no pixels to resize, so the optimizer leaves it alone by design.