You Are Paying Too Much for Cloud Storage Because of Unoptimized Images

By Optimage

Most teams treat cloud storage costs as a fixed line item. They are not. A proper image optimization pipeline can cut your S3 or Google Cloud Storage bill by 60-80% with zero changes to user experience.

The Bill That Keeps Growing

Server infrastructure and cost analytics dashboard

If your product has user-generated content, a media library, or any kind of image-heavy feature, you are probably paying more for cloud storage than you need to. Not by a little. By a lot.

The math is deceptively simple, but most teams never run it.

Consider a typical SaaS product with a user profile photo feature. Users upload profile pictures. The app stores them in Amazon S3. Nobody on the engineering team has ever thought about what format those images are stored in because "it just works."

Here is what that looks like at scale:

Metric Unoptimized Optimized (WebP) Difference
Average upload size 3.4 MB (JPEG from phone) 420 KB (WebP after processing) 88% smaller
100,000 users 340 GB 42 GB -298 GB
S3 Standard cost/month $7.82 $0.97 -$6.85/month
After 3 years $281.52 $34.92 Savings: $246.60

For a small startup with 100,000 users, that is a quarter-million dollars of wasted storage over three years for a single feature.

The Real Problem: Storage Compounds

Unlike compute, storage bills compound. Every upload you fail to optimize today adds to a permanent base cost that grows forever. You pay the storage cost every single month for as long as that file exists.

A feature you built two years ago, with images you never optimized, is still costing you money today for every image uploaded during those two years.

The most expensive storage decision you can make is "we'll deal with optimization later." Later never comes, and the bill has already started.

AWS S3 Pricing: The Full Picture

Most teams quote the base S3 storage rate ($0.023 per GB) and stop there. The real cost has three components:

Cost Component Rate Notes
Storage $0.023/GB/month The obvious one
PUT/COPY/POST requests $0.005 per 1,000 Every upload is a request
GET requests $0.0004 per 1,000 Every image load hits this
Data transfer out $0.09/GB Every image served to a user

The data transfer cost is where large media libraries get hit hardest. If your 340 GB library serves each image an average of 10 times per month, that is 3.4 TB of outbound transfer: $306/month in egress fees alone, on top of storage.

The same optimized 42 GB library, served the same number of times, generates 420 GB of outbound transfer: $37.80/month.

The data transfer savings alone dwarf the storage savings at scale.

Google Cloud Storage vs S3: Similar Story

GCS pricing is slightly different but the optimization math is identical:

Provider Storage (Standard) Egress (Internet)
AWS S3 $0.023/GB/month $0.09/GB
Google Cloud Storage $0.020/GB/month $0.08/GB
Azure Blob Storage $0.018/GB/month $0.087/GB
Cloudflare R2 $0.015/GB/month Free

Cloudflare R2's free egress is worth noting: if you are primarily concerned about transfer costs (which are often larger than storage costs for image-heavy apps), R2 eliminates that component entirely. But even on R2, you are still paying per GB of storage, and smaller files mean smaller bills.

The Bandwidth Multiplier on CDNs

Most production apps sit behind a CDN (CloudFront, Cloudflare, Fastly). CDNs have their own transfer pricing, and they cache aggressively, which is good. But the cache starts empty.

Every cache miss is a full origin fetch. Every origin fetch transfers the full unoptimized file from your S3 bucket to the CDN edge. If you have a globally distributed CDN with 10 regional edge locations, and each edge location cold-starts once per day for a 1,000-image media library, that is:

10 edges x 1,000 images x 3.4 MB = 34 GB of origin transfer per day

At $0.09/GB, that is $3.06/day from cache misses alone. $91.80/month. $1,101.60/year.

Optimized to 420 KB per image: $13.58/month from cache misses. Same number of images, same CDN, 85% cheaper.

The Real-World Fix: Process on Ingest

The cleanest architecture processes images at upload time, before they ever reach storage. This is called "ingest processing" and it looks like this:

User uploads JPEG (3.4 MB)
        ↓
Processing pipeline (Sharp, FFmpeg, or Optimage API)
        ↓
Convert to WebP, quality 80, strip EXIF
        ↓
Store optimized file (420 KB) in S3
        ↓
Delete original JPEG

The original is never stored. You pay for 420 KB, not 3.4 MB, from day one.

For teams building on Node.js, Sharp is the right tool for this pipeline. For teams that want a managed solution without building and maintaining their own image processing server, using a service like Optimage's API handles the conversion and returns the optimized file for you to store.

Auditing Your Existing Library

If you have years of unoptimized images in storage, a retroactive cleanup is worth running. Here is how to estimate the ROI before committing to a migration:

  1. Query your storage bucket for a sample of 1,000 images
  2. Record the average file size
  3. Process the sample through optimization (WebP conversion + quality 80)
  4. Record the new average file size
  5. Calculate the percentage reduction
  6. Multiply by your total image count and monthly storage cost

Most teams find 60-80% reduction. For a library with $2,000/month in combined storage and transfer costs, that is $1,200-$1,600/month in savings. A migration project that takes two weeks of engineering time pays for itself within the first month.

Format Matters More Than Compression Level

A common mistake is to optimize by cranking down JPEG quality (e.g., quality 60 instead of 90) and calling it done. This saves some space but introduces visible compression artifacts, and JPEG at quality 60 is still a much larger file than WebP at quality 80.

Format Quality Setting Typical File Size Visual Quality
JPEG 90 850 KB Excellent
JPEG 60 280 KB Noticeable artifacts
WebP 80 180 KB Excellent
AVIF 75 120 KB Excellent

The format switch from JPEG to WebP at equivalent visual quality is where the real savings live. You do not need to compromise image quality at all.

Start With the Highest-Traffic Assets

You do not need to optimize everything at once. Start with the assets generating the most storage egress, which are typically:

  1. Product or hero images (large, served frequently)
  2. User avatars (served on every page that shows user content)
  3. Blog post cover images (crawled by Google and cached globally)
  4. Thumbnail grids (many requests, but individually small)

Converting just these four categories typically captures 80% of the potential savings with 20% of the migration effort.

The math is straightforward and the tooling is available. Every day you delay is another day of paying for storage you should not need.

Try Optimage Free

Compress, convert, and optimize your images in seconds. No sign-up needed to start.

Start Optimizing Free
Back to The Optimage Journal