DEV Community

Ubed Sheikh
Ubed Sheikh

Posted on

I built an image compressor that targets an exact KB size because upload portals kept rejecting my files

A few months ago I kept running into the same frustrating problem:

Upload portals rejecting my images because the file size was just slightly over the limit.

Especially on: It was frustrating re-compressing the same image over and over just to reduce a few extra KB.

  • Government forms
  • Exam portals
  • Visa applications
  • Job applications

Most image compressors either:

  • Reduced quality too aggressively
  • Failed to hit the required KB size
  • Uploaded files to external servers
  • Or required too many manual adjustments

So I ended up building a browser-based image compression tool focused on one specific thing:

Compressing images to an exact KB target while keeping the quality as usable as possible.

A few things I focused on while building it:

  • Browser-based processing
  • No signup
  • Adjustable KB targeting
  • Support for JPG, PNG, and WebP
  • Keeping the workflow simple

One thing I didn’t expect during development was how difficult ultra-low KB targets become.

For example:

  • Compressing a 2MB image to 500KB is easy
  • Compressing that same image to 20KB without destroying it is much harder

I also realized metadata removal can make a surprisingly big difference for photos taken on modern phones.

The project is still improving, but it has already become one of the tools I personally use most often.

I’m still improving it, but it has already become genuinely useful for handling strict upload limits:

https://easytoolkit.in/compress-image-to-kb/

Top comments (1)

Collapse
 
ubed_sheikh_4d4526b53b452 profile image
Ubed Sheikh

One thing I underestimated while building this was how difficult ultra-low targets become.

Compressing a 2MB image to 500KB is easy.

Compressing that same image to ~20KB while keeping it usable is much harder than I expected 😅