ShortPixel
Replaceable in one session with an AI coding agent.
Image compression as a service: upload or point it at a site, and it returns smaller files, with plugins that do it automatically for the common content systems.
Build me image compression that replaces ShortPixel — and note that the tools are free and excellent, so this is about running them rather than writing them. STACK - Node 20+ with sharp, plus the specialist encoders where they beat it: pngquant and oxipng for PNG, mozjpeg for JPEG - A build step and a command-line tool. A service only if you take user uploads - SQLite through better-sqlite3 for the cache index WHAT ACTUALLY MAKES A FILE SMALLER, IN ORDER - **Resize to the sizes actually used.** Serving a 4000-pixel image into a 400-pixel slot is the largest waste on most sites, and no compressor fixes it. Do this first and measure again before tuning anything else - **Serve a modern format.** AVIF is typically 30% smaller than a good JPEG, WebP around 25%. The format choice saves more than any amount of quality tuning within a format - Then compress: quantise PNG to a palette, re-encode JPEG with trellis quantisation and progressive scans - Strip metadata — EXIF, thumbnails, and the location an ordinary phone photograph carries — but **keep the colour profile when the image is not sRGB**, because stripping that shifts every colour THE QUALITY QUESTION, WHICH IS THE CRAFT - A fixed quality number is the wrong approach: 80 is wasteful on a flat illustration and visibly poor on foliage - Target a perceptual metric instead. Encode at several qualities, measure each against the original with SSIM or ssimulacra, and keep the smallest that stays above a threshold - That search costs a few seconds per image and it happens once, cached by content hash. It is the difference between guessing and knowing - Calibrate the threshold by eye: run a page of your own images through it, look at them at real size on a real screen, and adjust. Do not trust a number you have not checked THE PIPELINE - Input at whatever resolution it arrived, output every declared size in every declared format - Width and height emitted so the markup can reserve space — layout shift is a worse experience than a large file - A manifest mapping source to derivatives, which the templates read to build a srcset - Cached by content hash plus every option, so an unchanged image is never re-encoded and a build that re-encodes everything is a build nobody runs THE AWKWARD CASES - Alpha: quantising an image with transparency badly produces fringing. Test with a logo on a coloured background - Animated GIFs: convert to video or animated WebP, usually ten times smaller. A GIF is a terrible video format - Screenshots and photographs of text compress badly and artefact visibly. Detect them by edge density and raise the threshold, or keep them lossless - Very small images: below a few kilobytes the format overhead dominates, so consider inlining them instead FOR USER UPLOADS - Then it is a service: a queue with a concurrency cap, a size limit enforced as bytes arrive, type from content rather than filename, and EXIF stripped before storage - Signed transform parameters, or a fixed set of named presets, so nobody uses your server as a free rendering farm AND THE CHECK IN CI - Fail the build if any committed image exceeds a budget. That single rule is how a site stops slowly filling with four-megabyte hero images, and it costs nothing WHAT MATTERS MOST Resizing and format, before compression. Those two usually beat any compressor including the paid one, and the perceptual search makes the third step honest rather than guessed.
What you lose
- A plugin that compresses on upload inside the content system you already use
- Capacity for a large back catalogue without you running anything
- Settings tuned so the default is nearly always right
- Somebody else keeping up with the formats browsers accept
If you would rather not build
- Squoosh, for a one-off by hand with a visible comparison
- A size budget in CI, which prevents the problem rather than fixing it
The escape hatch
open source · no votes, no paid placement
Why this verdict
our own opinion · changed only by a person
88/100
Verdict yes at 88: every encoder here is free and better than a service, and the work is a build step plus a cache. The plugin convenience is the only real loss.
History
tracked since 14 Aug 2026 · nothing is ever overwritten
Nothing recorded yet. This chart fills in once the page has visitors, votes or prompt copies — it will not draw a flat line to look busy.
Questions about ShortPixel
answered from the record above
Is ShortPixel free?
No — the plan we track is $9.99 a month. From around $9.99/month for a monthly image quota, with one-off credit packs also sold.
Can you replace ShortPixel by building your own?
YES. Replaceable in one session with an AI coding agent. Replacement score 88 out of 100, build time one session. Read what you lose before you decide.
How much does ShortPixel cost?
$9.99 a month on Short — $119.88 a year. Recorded 14 Aug 2026.
What do you lose by replacing ShortPixel?
A plugin that compresses on upload inside the content system you already use; Capacity for a large back catalogue without you running anything; Settings tuned so the default is nearly always right; Somebody else keeping up with the formats browsers accept. If any of those carry weight for you, keep paying.
Is there an open-source alternative to ShortPixel?
Yes: sharp, oxipng. The prompt on this page is for when you want it your way instead.
Related entries
same category first, most replaced first
Every week, something stops being worth paying for.
New verdicts, prices that moved, entries added. One email a week. Unsubscribe in one click. Nothing is being sent yet — your address is kept here, and the first issue is the first thing it is used for.
free forever · no tracking pixel · stored here, never passed to anyone

