The PR has two screenshots of a 1280-pixel settings page. They are lossless PNGs from the OS screenshot tool, 4–6 MB each. The review loads slowly on a train. Git LFS was not the plan. The pixels did not need to be lossless.
I’ve started treating an uncompressed screenshot as a draft artifact, not as the file that lands in the PR or the docs. Look at a quality slider (or a WebP/JPEG encode) in the tab, then attach the smaller file. Keep the original on disk if you must.
This is not the same job as “convert this PNG to WebP for production.” It is the five-minute step before you attach evidence to a review.
When in-tab compression is enough
Good fit:
- UI screenshots, before/after crops, a docs image that is not a diagram with 1px lines
- A PNG that is photograph-like (a photo in the page, a gradient hero)
- You want to see the quality tradeoff before you pick a format
Poor fit:
- UI chrome with hairline borders that already ring when you go to JPEG
- Source icons, logos, or assets that have a real lossless pipeline
- Images already run through the app’s image CDN
If the screenshot is also the wrong size, resize first. Compression is not a substitute for a 3000-pixel capture of a 400-pixel widget.
A simple evidence-image policy
- PR and issue images should be small enough to open on a phone
-
Prefer a short filename —
settings-empty-state.webp, notScreen Shot 2026-11-16.png - Look at the result at 1x before you attach it, especially around text
- Do not commit originals “just in case” into the app repo
Docs that need a lossless crop can still use PNG. They rarely need an uncompressed 6 MB PNG.
Encode in the tab, with the quality in view
You want a local encoder, a format picker, and a quality (or size) control you can see before download. No mandatory upload of a screenshot that might contain customer data.
When the file is already on disk and you are in the browser, an in-tab compressor is enough. Uwarp’s Squoosh-based compressor encodes WebP, PNG, and JPEG in the browser, so you can judge quality without sending the file to a server. Handy for one-off PR screenshots. If the team already has a docs image pipeline or an imagemin step, use that for anything that ships in the product.
Caveats: text and 1-pixel separators are the first thing to rot under a low JPEG quality. If the screenshot is evidence of a typography or contrast bug, stay closer to lossless, or attach both a crop and a compressed wide shot. Strip metadata if the capture includes a window title it should not.
If the PR needs both a wide shot and a detail crop, compress them separately. One 6 MB full-desktop PNG with a red circle drawn in a later slide is worse than a tight crop plus a smaller wide shot. Reviewers will look at the crop; the wide shot only has to establish context.
Reject / send back
Reject
- Multi-megabyte OS screenshots as the only images in a UI PR
- Uploading a screen that might show production data to a random online compressor
- Checking the uncompressed original into
git“for reference” - Compressing a logo or an icon until the edges smear
Accept
- A compressed, reasonably sized screenshot that still shows the bug or the state
- A lossless crop when the bug is the pixels
- A product image that went through the real asset pipeline
Top comments (0)