March 21, 2026
Playable Ad File Size Optimization: How to Stay Under 5MB
Every major ad network caps playable ads at 5MB — and some are even stricter. Here's a practical breakdown of what takes up space, how to compress every asset type, and how to hit your size targets without sacrificing quality.

You've built a playable ad that looks great and plays smoothly. You hit export, and the file comes back at 7.3MB. Google rejects it. Meta rejects it. Now you're cutting assets, lowering quality, and hoping something still works.
This is the most common problem in playable ad production. The 5MB ceiling isn't a suggestion. It's a hard wall enforced by nearly every ad network. Miss it, and your ad simply won't run.
In this guide, we'll break down exactly what takes up space inside a playable ad, walk through compression techniques for every asset type, and give you a complete table of size limits across all major networks. Whether you're building ads manually or using an AI-powered tool, these principles apply.
Why 5MB? Understanding Ad Network Size Limits
Playable ads run inside mobile ad SDKs, lightweight containers designed to load fast on cellular connections. Networks enforce strict size limits to protect user experience. A 10MB ad on a 3G connection means seconds of blank screen before anything renders, which tanks engagement and reflects poorly on the network.
The 5MB limit has become the industry standard, but the details vary significantly by platform. Some networks require a single inlined HTML file. Others accept ZIP bundles with separate assets. Some inject MRAID SDKs that consume part of your budget. Understanding these differences is essential.
Ad Network Size Limits and Format Requirements
| Ad Network | Max File Size | Format | MRAID | Key Notes |
|---|---|---|---|---|
| Google Ads | 5MB | ZIP | No | Max 512 files in ZIP; requires ad.size meta tag |
| Meta (Facebook) | 5MB | HTML | No | Single HTML file recommended; max 100 files if bundled |
| TikTok & Pangle | 5MB | ZIP | No | ZIP with index.html entry point |
| Unity Ads | 5MB | HTML | 3.0 | Single inlined, minified HTML file; must support portrait and landscape |
| AppLovin | 5MB | HTML | 2.0 | Single inline HTML; all images must be base64-encoded; uses mraid.open() |
| ironSource | 5MB | HTML | 2.0 | Single inline HTML file; no external requests |
| Mintegral | 5MB | ZIP | No | ZIP bundle with assets folder |
| Vungle (Liftoff) | 5MB | ZIP | No | ZIP bundle with assets folder |
| AdMob | 5MB | ZIP | No | Same requirements as Google Ads |
| Moloco | 5MB | HTML | No | Uses FbPlayableAd.onCTAClick() for CTA handling |
Notice the split: networks like Unity, AppLovin, and ironSource require everything inlined into a single HTML file: all images, audio, and fonts encoded as base64 data URIs. Others like Google and TikTok accept ZIP bundles with separate asset files. This distinction fundamentally changes your optimization strategy. For a deeper look at each network's full spec sheet, see our Google Ads playable ad guide.
What Actually Takes Up Space
Before you start compressing, you need to know where your bytes are going. Here's a typical breakdown for a 2D playable ad before optimization:
- Images: 50–70%. Background images, sprites, UI elements, brand logos, and end card graphics are almost always the largest consumers. A single uncompressed PNG background can eat 500KB–1MB on its own.
- Audio: 10–25%. Background music and sound effects. A 30-second music loop in MP3 at 128kbps is roughly 480KB. Multiple sound effects add up fast.
- Fonts: 5–15%. A full TrueType font file averages 100–400KB. If you're using two or three fonts, that's potentially over 1MB just for typography.
- Game code (JavaScript/HTML/CSS): 5–15%. The actual game logic, rendering code, and styles. This is usually the smallest portion, especially if minified.
- Base64 encoding overhead: +33%. When assets are inlined as data URIs (required by networks like AppLovin and Unity), base64 encoding adds approximately 33% to the raw file size. A 300KB image becomes ~400KB when base64-encoded.
The math is straightforward: if your raw assets total 4MB but you need to base64-inline everything, you're already over 5MB before adding any game code. Optimization isn't optional. It's structural.
Image Optimization: The Biggest Win
Since images consume the majority of your file size budget, this is where optimization has the most impact.
Choose the Right Format
- WebP. The best general-purpose choice for playable ads. WebP delivers 25–34% smaller files than JPEG at equivalent quality and 26% smaller than PNG for lossless compression (Google Developers). Browser support is 97%+. Use for photographs, complex graphics, and backgrounds.
- SVG. Ideal for logos, icons, simple shapes, and UI elements. SVG files are typically 89–94% smaller than PNG equivalents for vector graphics (Vecta.io). A logo that's 40KB as PNG might be 2KB as SVG.
- PNG. Use only when you need lossless transparency and WebP isn't an option. Always run through a compression tool like TinyPNG.
- JPEG. Good for photographic backgrounds where transparency isn't needed. Compress to 60–75% quality. The difference is usually imperceptible on a mobile screen.
Resolution Matters More Than You Think
Playable ads run on mobile screens, not desktop monitors. A background image doesn't need to be 2048×2048. Practical resolution targets:
- Backgrounds: 750×1334 (iPhone 8 logical resolution) is sufficient for most cases
- Sprites and game elements: Size to actual display dimensions, not source art dimensions
- UI icons: 64×64 or smaller. Use SVG when possible
- End card graphics: 600×800 maximum. Compress aggressively
Halving the resolution of an image reduces its file size by roughly 75%. That single change alone can save megabytes across a project.
Audio Optimization: Small Files, Big Impact
Audio is often overlooked in optimization because the files seem small individually. But they add up, especially after base64 encoding.
- Compress to AAC at 64kbps. This is the sweet spot for mobile playback, good enough quality for a 30-second ad, dramatically smaller than 128kbps or 192kbps MP3. A 30-second loop at 64kbps AAC is roughly 240KB, half the size of 128kbps MP3.
- Trim ruthlessly. If your game lasts 15–30 seconds, your music loop doesn't need to be 60 seconds. Trim to the exact duration needed.
- Limit sound effects. Three to five short sound effects (tap, success, fail, transition) are enough. Each should be under 50KB.
- Consider procedural audio. Simple sounds like clicks and pops can be generated with the Web Audio API at zero file cost. This trades a few lines of code for significant size savings.
Font Optimization: The Hidden Size Trap
Fonts are the most commonly overlooked source of file bloat. A standard font file contains thousands of glyphs, characters for Latin, Cyrillic, Greek, Arabic, CJK, and more. Your playable ad uses maybe 50–80 unique characters.
Font Subsetting
Font subsetting strips a font file down to only the characters your ad actually uses. The results are dramatic:
- Full Roboto Regular: ~170KB
- Subset (Latin uppercase + numbers + basic punctuation): ~15KB
- Savings: ~91%
If your playable ad only displays "TAP TO PLAY", "SCORE: 100", and "DOWNLOAD NOW", you need fewer than 30 characters. A subset font for that weighs under 10KB.
Additional Font Strategies
- Use one font, not three. Every additional font family doubles your typography budget. Use weight variations (bold, regular) of a single family instead.
- Use WOFF2 format. WOFF2 provides the best compression for web fonts, typically 30% smaller than TTF.
- Consider system fonts for non-branded text. UI labels and score counters can use the device's system font at zero cost.
- Render text as canvas paths. For short, static text (like a logo or title), converting the text to canvas drawing commands eliminates the font file entirely.
Base64 Inlining vs. External Assets
This is the key architectural decision that affects everything else. The approach depends on which networks you're targeting.
When You Must Inline (Base64)
Networks like Unity, AppLovin, and ironSource require a single HTML file with zero external references. Every image, sound, and font must be base64-encoded directly into the HTML. This means:
- Your effective asset budget is ~3.75MB (since base64 adds ~33% overhead to reach the 5MB limit)
- Aggressive compression is mandatory
- Every kilobyte of raw asset size costs 1.33KB in the final file
When You Can Bundle (ZIP)
Networks like Google, TikTok, Mintegral, and Vungle accept ZIP bundles with separate asset files. This avoids the base64 overhead, giving you the full 5MB budget for actual content. ZIP compression may even save an additional 10–20% on text-based files like HTML and JavaScript.
The Multi-Network Challenge
If you're exporting to multiple networks, which most advertisers do, you need to optimize for the most restrictive format first. Build your asset pipeline around the base64-inlined 3.75MB budget, and the ZIP exports will comfortably fit within their limits.
Code Optimization: The Last 10%
Game code is typically the smallest portion of file size, but every byte counts when you're near the limit.
- Minify everything. Remove whitespace, comments, and shorten variable names. This typically saves 40–60% on raw JavaScript.
- Avoid external libraries. Importing a full game framework like Phaser.js (~980KB minified) or Three.js (~660KB minified) is a significant chunk of your budget. Pure HTML Canvas with vanilla JavaScript has zero overhead. Our engine comparison guide breaks down exactly when each library is worth the size cost, and when it isn't. (See our game type catalog for which mechanics work best with lightweight Canvas rendering.)
- Remove dead code. If you're working from templates, strip any functions or event handlers that aren't used in this specific ad.
- Use CSS for simple animations. CSS transforms and keyframe animations are handled by the GPU and require far less code than JavaScript animation loops.
A Practical Optimization Checklist
Before you export, run through this checklist:
- Audit your assets. List every image, audio file, and font. Note the file size of each.
- Convert images to WebP (or SVG for vectors). Compress at 70–80% quality.
- Resize images to actual display dimensions. No 2048px sprites for 100px game elements.
- Subset all fonts to only the characters used in your ad.
- Compress audio to AAC at 64kbps. Trim to exact duration needed.
- Minify HTML, CSS, and JavaScript.
- Calculate base64 overhead if targeting inline-only networks. Multiply raw asset size by 1.33.
- Test on target networks. Each network's preview tool will validate your file before submission.
How Hookin Handles This Automatically
If this sounds like a lot of manual work, it is. This is one of the reasons teams spend days on export optimization alone. Hookin automates the entire pipeline.
When you export a playable ad from Hookin, the system runs a multi-stage optimization pipeline for each target platform:
- Automatic image optimization: images are resized and compressed at multiple resolution tiers based on the remaining size budget
- Audio compression: background music and sound effects are transcoded to AAC at optimal bitrates
- Font subsetting: fonts are automatically stripped down to only the characters present in the ad
- Platform-aware bundling: the system knows which networks need inlined HTML and which accept ZIP bundles, and packages accordingly
- MRAID injection: for networks that require it (Unity, AppLovin, ironSource), the correct MRAID SDK version is injected automatically
Optimization intensity also scales dynamically. If the first pass produces a file under 5MB, light compression is used to preserve quality. If it's over, the system progressively increases compression until the target is met. The result: you export once, and Hookin delivers network-ready files for all 10 supported platforms, each optimized specifically for that network's requirements.
Start Building Optimized Playable Ads
File size optimization is one of the least glamorous but most critical parts of playable ad production. Get it wrong, and your ad never runs. Get it right, and you can focus on what actually matters: creative quality and campaign performance.
Whether you're optimizing manually or looking for a tool that handles it for you, the principles in this guide apply. Compress images aggressively, subset fonts, trim audio, and always account for base64 overhead when targeting inline networks. If you want to see the full pipeline in action, our guide on creating a playable ad in 10 minutes shows how Hookin's auto-compression handles all of this behind the scenes.
Export optimized playable ads under 5MB to 10 networks. Try Hookin's auto-compression pipeline
More From The Blog
Ready to Create Playable Ads?
Turn your ideas into interactive ad experiences with AI. No coding required.
Start Free


