How to Reduce EPUB File Size — Image Compression, Font Subsetting, and More
Large EPUB files load slowly on e-readers and can exceed publishing platform limits. Here's how to reduce EPUB file size without losing quality.
Why EPUB Files Get Large
EPUB files are ZIP archives. The biggest contributors to file size:
- Uncompressed images: PNG screenshots, high-resolution cover art, and embedded diagrams. A single 4K PNG can be 5–10 MB.
- Embedded fonts: Full OpenType or TrueType font files can be 300 KB–2 MB each. Multiple weights add up.
- Unoptimized HTML/CSS: Usually small, but large tables or inline styles add bytes.
- Duplicate assets: The same image embedded multiple times (common in auto-converted PDFs).
Publishing platform limits to know: KDP 650 MB, Apple Books 2 GB (but recommends <200 MB for performance), Kobo 2 GB, Draft2Digital 300 MB.
Method 1: Calibre — Lossless Image Compression
Calibre's built-in editor compresses images without quality loss:
- Right-click the EPUB in Calibre → Edit book.
- Go to Tools → Compress images losslessly.
- Calibre runs OptiPNG and other lossless compressors on all embedded images.
- Save the file.
This typically reduces PNG images by 20–40% with no visible quality loss. For a book with many diagrams, this alone can cut the EPUB size in half.
Method 2: Convert PNG Images to JPEG
For photographs and covers (not line art or text), JPEG is far more efficient than PNG:
- In Calibre's editor, open each PNG image from the Images/ panel.
- Export → save as JPEG at 85% quality.
- Replace the PNG with the JPEG in the file list.
- Update references in HTML files from
.pngto.jpg.
A 3 MB PNG photograph often compresses to 200–400 KB as JPEG at 85% quality — an 8x reduction with no perceptible difference on e-ink screens.
Method 3: Subset Embedded Fonts
Font subsetting removes unused characters from embedded font files, keeping only the glyphs actually used in the book:
# Install pyftsubset (part of fonttools)
pip install fonttools
# Subset a font to only Latin characters used in English text
pyftsubset font.ttf --unicodes="U+0020-007E,U+00A0-00FF" --output-file=font-subset.ttf
A full Latin/Cyrillic/Greek OpenType font at 400 KB often subsets to 40–80 KB for an English-only book — a 5–10x reduction. Update the font reference in the EPUB's CSS after replacing.
Method 4: Remove Unused Fonts
If the EPUB embeds fonts but the target platform substitutes its own (Kindle, Kobo, Apple Books all have good system fonts), removing embedded fonts entirely saves the most space:
- In Calibre's editor, open the Fonts/ folder in the file list.
- Delete all font files.
- Update the CSS to remove
@font-facedeclarations and fallback to system fonts.
This is appropriate for trade fiction and nonfiction. For textbooks, poetry, or books with special typography, keep the fonts.
Method 5: Resize Oversized Images
E-readers have small screens — a 3000×4000 px image wastes space. Resize to screen resolution:
- Standard e-readers: 1264×1680 px (Kobo Libra 2, Kindle Paperwhite)
- Tablets (Apple Books, Kindle Fire): 2048×2732 px
- Cover image: 1600×2560 px minimum per KDP recommendation
# Batch resize all images in a folder using ImageMagick
mogrify -resize 1264x1680">" *.jpg
The > flag only downsizes — images smaller than the target are left unchanged.
Method 6: Remove Unnecessary Metadata
Auto-converted EPUBs often embed large <metadata> blocks with hundreds of Dublin Core fields. Clean these up in Calibre's metadata editor or directly in the OPF file. Small gain but every byte counts.
Checking EPUB Size After Optimization
After optimizing, verify the EPUB still validates:
java -jar epubcheck.jar book-compressed.epub
Then check the size reduction:
ls -lh book.epub book-compressed.epub
Converting a PDF to EPUB? toolkit.bot generates compact EPUBs with optimized image handling.
Convert PDF to EPUB →