LogicTrail
  • Trails
  • Check my app
  • Pricing
  • Sign in
  1. Trails
  2. /
  3. Bills that explode
  4. · 5 minutes · Pro

The 4 MB thumbnail

Your marketplace shows 24 small product photos per page. On phones it takes ages to load, and your storage bill warns you are over your limit.

This answers: Why are my uploaded images making my app slow? No coding needed. 3 quick decisions.

  • Costs and abuse
  • How a request travels

Checking your access…

Why are my uploaded images making my app slow?

Your app is probably storing and serving the full-size photos users upload, often 4 MB or more, even where they are shown as small thumbnails. Browsers download the whole file before shrinking it. Create smaller copies at upload or with an image service, serve WebP or AVIF, and give each screen the size it needs.

Trail of the bug
  1. Browser
  2. File storage

Breaks at File storage: Sends 4 MB originals as thumbnails

How it works

The same photo, four ways
  • Camera original, 4032 px JPEG4.2 MB · 3.4 s on a phone
  • Resized to 1600 px, JPEG420 KB · 0.3 s on a phone
  • Resized to 1600 px, WebP290 KB · 0.2 s on a phone
  • Thumbnail, 400 px WebP24 KB · under 0.1 s on a phone
File size and download time on a 10 Mbit/s phone connection
VersionSize (KB)Seconds
Camera original, 4032 px JPEG42003.36
Resized to 1600 px, JPEG4200.34
Resized to 1600 px, WebP2900.23
Thumbnail, 400 px WebP240.02
Resizing to the size you show does most of the work; WebP trims a little more. A gallery of 24 thumbnails weighs about 100 MB as originals, or about 0.6 MB as thumbnails.

Why AI tools write this bug

Generated upload code usually saves the file exactly as uploaded and shows it with a small width in the page, which looks fine on a fast laptop with a few test images.

How to fix it

  1. Check image sizes in the against the size shown.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock

Common questions

Is WebP smaller than JPEG?
Usually yes, often by around a quarter to a third at similar quality. AVIF is smaller still, but resizing to the displayed size saves far more than either.

Related scenarios

  • The open summarise buttonFree · 4 min
  • A quiet week, a loud billPro · 4 min
  • The address box that cost $1,900Pro · 5 min

More on this trail

Bills that explode: Open AI endpoints, bot traffic, fake signups and functions that loop forever.

Want someone to look?

We check AI-built apps for this and three other common leaks, in plain English.

Check my app
Sign in

Sign in to walk this one

3 decisions, about 5 minutes, and a prompt to check your own app for the same problem.

Sign in No password. We email you a link.

How to fix it

  1. Check image sizes in the against the size shown.

3 more steps, and a prompt that checks your own app for this bug. Part of Pro.

Unlock