GuidesThe EPUB format · Published 11 Jun 2026 · Updated 2 Sep 2026 · toolkit.bot

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 (KDP: 650 MB, Draft2Digital: 300 MB). Here's how to reduce EPUB file size by 50–80% without losing quality.

Why EPUB Files Get Large

EPUB files are ZIP archives. The biggest contributors to file size:

Publishing platform limits to know: KDP 650 MB, Apple Books 2 GB (but recommends <200 MB for performance), Kobo 2 GB, Draft2Digital 300 MB.

Find What Is Taking the Space

An EPUB is a ZIP file. Rename it to .zip, extract it, and the largest files in OEBPS/ or EPUB/ are the problem — almost always in images/ or fonts/:

cp book.epub book.zip
unzip book.zip -d book-contents
du -sh book-contents/*/images/*   # which images are large
du -sh book-contents/*/fonts/*    # font sizes

As a rule of thumb: a text-only novel or report should be 50–500 KB; text with a few diagrams 500 KB–3 MB; an illustrated textbook 3–20 MB. Anything over 50 MB almost always contains rasterized pages or unoptimized images.

Method 1: Calibre — Lossless Image Compression

Calibre's built-in editor compresses images without quality loss:

  1. Right-click the EPUB in Calibre → Edit book.
  2. Go to Tools → Compress images losslessly.
  3. Calibre runs OptiPNG and other lossless compressors on all embedded images.
  4. 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. Right-click → Polish books does the same recompression and also removes unused files, without opening the editor.

Command-line alternative on the extracted folder, then repack with mimetype first and uncompressed:

jpegoptim --max=85 book-contents/*/images/*.jpg
optipng -o5 book-contents/*/images/*.png

cd book-contents
zip -X0 ../book-optimized.epub mimetype
zip -rX9 ../book-optimized.epub . --exclude mimetype

Method 2: Convert PNG Images to JPEG

For photographs and covers (not line art or text), JPEG is far more efficient than PNG:

  1. In Calibre's editor, open each PNG image from the Images/ panel.
  2. Export → save as JPEG at 85% quality.
  3. Replace the PNG with the JPEG in the file list.
  4. Update references in HTML files from .png to .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:

  1. In Calibre's editor, open the Fonts/ folder in the file list.
  2. Delete all font files.
  3. Update the CSS to remove @font-face declarations and fallback to system fonts.

Without opening the editor: Convert books → Look & Feel → Remove all embedded fonts does the same thing during a conversion. 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:

# 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.

If the EPUB Is Made of Page Images

If the file list shows one large image per page and almost no text in the XHTML files, the PDF-to-EPUB conversion rasterized the pages (Calibre does this on complex PDFs). No amount of image compression fixes that — reconvert with a tool that extracts the text. toolkit.bot performs text extraction with layout analysis, so the output contains real text; files are typically 95–99% smaller than a rasterized conversion.

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 →

Related guides