← back to Dw Image Shrink
phase0-report.md
36 lines
# Phase 0 — DW Shopify Storage Diagnosis
_Generated from ground-truth Shopify enumeration (315198 product images across 151210 products)._
## Measured product-image footprint (extrapolated from HEAD sampling)
| dimension bucket | # images | mean size | est. total |
|---|--:|--:|--:|
| >3000 | 4,148 | 6962 KB | 27.54 GB |
| 2049-3000 | 15,240 | 1364 KB | 19.82 GB |
| 1501-2048 | 44,617 | 585 KB | 24.88 GB |
| 1001-1500 | 108,737 | 567 KB | 58.83 GB |
| <=1000 | 132,592 | 208 KB | 26.28 GB |
| **animated GIF (exact)** | 9,864 | 3918 KB | 36.17 GB |
| **TOTAL (product images)** | 315,198 | | **193.5 GB** |
Calibration: on 113 real oversized masters, re-encode (≤2048px, q82) → **20%** of original size (≈80% shrink).
## Reclaimable by compression (oversized-first scope)
- >2048px downsize+quality: **41.6 GB** estimated reclaimable.
- Headroom target (~15% of 500 GB): **75 GB**.
## Unmeasured buckets (NOT compressible / need other action)
- **Videos:** {"IMAGE":456,"VIDEO":1} (from 200 most-recent products). Videos aren't in the REST images inventory — if VIDEO count is material, they may be a big chunk needing separate handling.
- **Files section** (theme assets, blog/email/app uploads, old themes): NOT API-queryable → **Steve must check Settings → Files** (sort by size) + Online Store → Themes for duplicate/unpublished themes.
- These + GIFs (36.17 GB) are the non-JPEG buckets compression won't touch.
## Status breakdown (purge-track candidates)
- draft: 48,586 images
- active: 176,278 images
- archived: 90,333 images
- unlisted: 1 images
- Archived-product images = 90,333 → purge candidates (Steve-gated).
## VERDICT: GO
**Reasoning:** product images total ≈ **194 GB** of the 500 GB cap. If this is well under 500 GB, the compressible images are NOT what filled the cap — the bulk is videos, the Files section, or media the mirror/enumeration can't see — and **compression alone will not clear the cap**. In that case the real levers are: purge orphaned/archived media + oversized GIFs/videos, clean the Files section, and/or upgrade the plan. Compression still helps and runs, but the scratch-upload gate (Phase 4) is the arbiter.