Disclosure: I build and maintain Apps66. The browser-local HTML5 Canvas binary-search compression algorithm below is completely reusable in your own JavaScript projects, and every Apps66 image link below runs 100% client-side with zero uploads (verifiable offline in DevTools).
Image upload failures split into two frustrating worlds: hard byte-ceiling portals (passports, visas, competitive exams, HR forms that reject a 50.4 KB JPG outright) and strict dimension marketplaces (Shopify, Etsy, Amazon, Instagram, YouTube where wrong widths break hover-zoom or trigger blurry server-side recompression).
Below is a single 2026 reference table for both worlds - plus a quick GPU Power-of-Two texture note, a drop-in JavaScript 7-step binary-search Canvas compressor, and a 20-second DevTools offline privacy audit.
1. 2026 Government, Visa, Exam & Job Portal KB Spec Table
Two hidden culprits blow past strict KB limits before quality even enters the equation: raw 12 MP camera dimensions (4000×3000 px) and embedded EXIF/ICC metadata (15-60 KB of invisible overhead). Pairing the right pixel budget with sRGB JPG (not lossless PNG) keeps portraits and signatures razor-sharp under the cap.
| Hard KB Cap | Common Portals & Use Cases | Optimal Pixel Dimensions | Recommended Format & Quality | Browser-Local Preset |
|---|---|---|---|---|
| 20 KB | Exam signatures (SSC, UPSC, IBPS, GATE), legacy university avatars, lightweight email signatures | 200×60 px (signatures) to 300×300 px (headshots) | JPG (#FFFFFF fill); Q 60-80 | Compress to 20 KB |
| 50 KB | Passport & visa headshots (DS-160, Schengen, UK/Indian/Canadian portals), exam IDs, HR onboarding | 350×450 px to 600×600 px | JPG (sRGB); Q 72-86 | Compress to 50 KB |
| 100 KB | Job application portals, resume avatars, web registrations, Core Web Vitals blog thumbnails | 800×800 px to 1200×800 px | JPG (forms) / WebP (web); Q 76-88 | Compress to 100 KB |
| 200 KB | US Visa / DV Lottery (240 KB safety margin), passport scans, Shopify product cards, WordPress heroes | 1200×900 px to 1600×1200 px | WebP (stores/web) / JPG (portals); Q 80-90 | Compress to 200 KB |
| 500 KB | Photography portfolios, real-estate listings, full-bleed hero banners, email attachments, PDF embeds | 1920×1080 px to 2400×1600 px | JPG (email/PDF) / WebP (galleries); Q 85-94 | Compress to 500 KB |
| Custom (5 KB-20 MB) | Odd portal limits (235 KB for 240 KB visa caps, 300 KB CMS caps, 1 MB store limits) | Matched to destination aspect ratio | JPG or WebP binary-searched to exact target | Custom Exact-KB Tool |
2. 2026 E-Commerce & Social Marketplace Image Spec Table
| Platform | Primary Recommended Size | Format & Payload Target | Key Secondary Presets & Gotchas | Browser-Local Preset |
|---|---|---|---|---|
| Shopify | 2048×2048 px (1:1 square) | WebP (or JPG) under 200-300 KB (max 4472×4472 / 20 MB) | Collection 1024×1024, Hero 1920×1080, Portrait 1600×2000, Blog 1200×630 | Shopify Resizer |
| Etsy | 2000×2000 px (1:1) or 2000×1500 px (4:3) | JPG (sRGB) under 1 MB; min 2000 px shortest side for zoom | Big Banner 3360×840, Mini Banner 1200×160, Shop Icon 500×500 | Etsy Resizer |
| Amazon | 1600×1600 px to 2000×2000 px | JPG (sRGB) on pure white #FFFFFF; 1600 px+ enables hover-zoom | Range 500-10,000 px; A+ Banner 970×600, A+ Header 970×300, Brand Store 3000×600 | Amazon Resizer |
1080×1350 px (4:5 portrait) | JPG at exact 1080 px width (prevents server downscaling blur) | Square 1080×1080, Stories/Reels 1080×1920, Landscape 1080×566, Profile 320×320 | Instagram Resizer | |
| YouTube | 1280×720 px (16:9 HD) | JPG/PNG strictly under 2 MB (JPG Q 88 is typically 120-300 KB) | Min 640 px wide; Banner 2560×1440, Avatar 800×800, Shorts 1080×1920; avoid bottom-right timestamp corner | YouTube Resizer |
| Custom Bulk | Any exact pixel width/height | JPG, PNG, or WebP (Keep Ratio or Exact Crop) | Uniform aspect ratios across product catalogs and blog galleries | Bulk Image Resizer |
3. Quick GPU Power-of-Two Texture Note (WebGL & 2D Games)
If you build 2D games or WebGL apps instead of e-commerce catalogs, remember that disk KB != GPU VRAM. Decoded RGBA8 textures occupy width × height × 4 bytes in GPU memory regardless of PNG compression:
-
2048×2048PNG (180 KBon disk) = 16 MB RGBA8 VRAM -
2050×2050NPOT PNG = breaks mipmap generation or pads up to4096×4096(64 MB VRAM)
You can check Power-of-Two alignment, RGBA8 VRAM cost, and alpha waste completely offline in our browser-local Sprite Sheet Slicer & Texture Atlas Inspector.
4. The 7-Step Binary-Search HTML5 Canvas Algorithm
Fixed quality presets ("compress to 70%") either waste sharpness on simple images or overshoot tight byte ceilings on complex portraits. A 7-step binary search over HTMLCanvasElement.toBlob() converges to 0.82 / 2^7 ≈ 0.0064 quality precision locally in the browser - automatically stripping EXIF bloat, flattening PNG transparency onto pure #FFFFFF for JPEG output, and only stepping down pixel dimensions when even q = 0.12 exceeds the target ceiling:
async function compressToExactBytes(img, targetBytes, mime = 'image/jpeg') { const toBlob = (canvas, quality) => new Promise((resolve) => canvas.toBlob(resolve, mime, quality)); let scale = 1.0; for (let pass = 0; pass < 8; pass++) { const w = Math.max(32, Math.round(img.naturalWidth * scale)); const h = Math.max(32, Math.round(img.naturalHeight * scale)); const canvas = document.createElement('canvas'); canvas.width = w; canvas.height = h; const ctx = canvas.getContext('2d'); if (mime === 'image/jpeg') { // Prevents black halos on transparent PNG signatures & Amazon cutouts ctx.fillStyle = '#ffffff'; ctx.fillRect(0, 0, w, h); } ctx.imageSmoothingEnabled = true; ctx.imageSmoothingQuality = 'high'; ctx.drawImage(img, 0, 0, w, h); // 1. Ceiling fast-path: keep near-lossless quality if already under target const high = await toBlob(canvas, 0.94); if (high && high.size <= targetBytes) { return { blob: high, width: w, height: h, quality: 0.94 }; } // 2. Floor check + 7-step binary search over [0.12, 0.94] const low = await toBlob(canvas, 0.12); if (low && low.size <= targetBytes) { let lo = 0.12; let hi = 0.94; let best = low; let bestQ = lo; for (let i = 0; i < 7; i++) { const mid = (lo + hi) / 2; const candidate = await toBlob(canvas, mid); if (candidate && candidate.size <= targetBytes) { best = candidate; bestQ = mid; lo = mid; } else { hi = mid; } } return { blob: best, width: w, height: h, quality: Number(bestQ.toFixed(3)) }; } // 3. Area-proportional downscale when dimensions cannot fit at q = 0.12 const ratio = low ? Math.sqrt(targetBytes / Math.max(1, low.size)) : 0.75; scale *= Math.max(0.45, Math.min(0.85, ratio * 0.92)); if (w <= 48 || h <= 48) break; } return null; } 5. How to Verify 100% Browser-Local Zero-Upload Execution Offline
Sensitive identity photos (passports, visas, signatures) and unreleased product catalogs should never touch a third-party server. You can verify client-side execution yourself in 20 seconds:
- Open apps66.com/compress-to-size (or any preset above) and wait for initial load.
- Open DevTools (
F12/Cmd+Opt+I) -> Network tab -> clear the log. - Set Network throttling to Offline (or switch off Wi-Fi).
- Drop your image, run compression or resizing, and click Download.
- Confirm zero
POST/PUTupload requests fire and the result saves directly from a localblob:URL.
Free vs Pro Limits (Full Transparency)
- Free (no signup): Compress or resize up to 5 images per batch locally with individual downloads and no input file-size upload cap.
- Apps66 Pro: Unlocks unlimited images per batch and 1-click Download All as ZIP (plus 500 MB chunked server uploads across Apps66's server tools) via a one-time $4.99 7-Day Pass (no subscription) or $9/month / $79/year (both with a 7-day free trial).
Originally published at apps66.com/blog/strict-portal-marketplace-image-specs-2026.