DEV Community

Cover image for I Built a Free Image Optimizer That Outputs Responsive HTML — No Sign-Up, No Storage
Saima Syed
Saima Syed

Posted on • Originally published at builtranked.hashnode.dev

I Built a Free Image Optimizer That Outputs Responsive HTML — No Sign-Up, No Storage

Every Lighthouse audit I ran on client sites flagged the same three things:

❌ Serve images in next-gen formats
❌ Properly size images
❌ Avoid layout shifts

The existing free tools either compressed one file and called it done, or they stored your uploads on their servers indefinitely. Neither was good enough for client work.
So I built ImgForge — a free, server-side image optimizer that resolves all three Lighthouse image audits in a single upload.

What's wrong with existing tools

Most image optimizers hand you back a smaller JPEG. That's not modern web performance — that's step one of five.
What you actually need is:

AVIF + WebP + JPEG variants — browser support for AVIF still isn't universal
Device-specific sizes — a 1920px image served to a 480px phone wastes ~70–90% of its bytes
A ready-to-paste element — with srcset, sizes, loading, decoding, and fetchpriority already written
EXIF stripped — GPS coordinates, device info, and timestamps have no place in a production image

I couldn't find a single free tool that handled all of this in one pass.

What ImgForge does

Built on Sharp (libvips under the hood — faster than ImageMagick, lower memory footprint, non-blocking async processing), everything runs server-side and streams to your browser as a ZIP. Nothing is stored after download.
One upload produces:

Multi-format output

AVIF, WebP, and JPEG — simultaneously. AVIF typically runs ~50% smaller than JPEG at equal visual quality. JPEG is the universal fallback.
Multi-device variants

Mobile — 480px + @2x Retina
Tablet — 1024px
Desktop — 1920px

Up to 12 variants per image, covering every major breakpoint.

Lighthouse-optimised HTML snippet

<picture>
  <source type="image/avif"
          srcset="images/mobile/imageo-optimizer-online-imageforge_mobile_400.avif 400w,
                  images/mobile/imageo-optimizer-online-imageforge_mobile_800@2x.avif 800w,
                  images/tablet/imageo-optimizer-online-imageforge_tablet_700.avif 700w,
                  images/desktop/imageo-optimizer-online-imageforge_desktop_1200.avif 1200w"
          sizes="(max-width: 480px) 400px, (max-width: 1024px) 700px, 1200px">
  <source type="image/webp"
          srcset="images/mobile/imageo-optimizer-online-imageforge_mobile_400.webp 400w,
                  images/mobile/imageo-optimizer-online-imageforge_mobile_800@2x.webp 800w,
                  images/tablet/imageo-optimizer-online-imageforge_tablet_700.webp 700w,
                  images/desktop/imageo-optimizer-online-imageforge_desktop_1200.webp 1200w"
          sizes="(max-width: 480px) 400px, (max-width: 1024px) 700px, 1200px">
  <img src="images/fallback/imageo-optimizer-online-imageforge.jpg"
       srcset="images/mobile/imageo-optimizer-online-imageforge_mobile_400.png 400w,
               images/mobile/imageo-optimizer-online-imageforge_mobile_800@2x.png 800w,
               images/tablet/imageo-optimizer-online-imageforge_tablet_700.png 700w,
               images/desktop/imageo-optimizer-online-imageforge_desktop_1200.png 1200w"
       sizes="(max-width: 480px) 400px, (max-width: 1024px) 700px, 1200px"
       alt="Free Image Optimizer Online — Compress, Convert & Get Responsive HTML in One Click"
       width="1200" height="800"
       loading="lazy" decoding="async">
</picture>
Enter fullscreen mode Exit fullscreen mode

Paste directly into your project. No manual attribute writing.

Above / below fold control

Hero image? Toggle "Above the Fold" and ImgForge adds fetchpriority="high" plus a tag — protecting your LCP score. Everything else gets loading="lazy" automatically.
Organised ZIP structure
/mobile
/tablet
/desktop
/fallback
snippet.html
README.md

Privacy consideration for client work

This one matters more than people realise: if you upload a client's product photos or brand assets to a third-party tool that stores them, that's a data handling problem. ImgForge processes and streams. Once the ZIP is downloaded, nothing is retained.
No account. No subscription. No storage.

Try it

👉 imageoptimizer.online — free, no sign-up required.
The Format Guide on the site covers AVIF vs WebP vs JPEG compression tradeoffs in detail if you want to go deeper. Feedback welcome — especially if you're using Sharp for anything interesting in your own stack.

Top comments (0)