Every image in your ebook needs three things: the right file format, appropriate dimensions, and alt text. Get any of these wrong and you face consequences ranging from bloated file sizes to Amazon ranking suppression. A 2025 analysis of over 10,000 EPUB scans through Rahatt found that 68% of ebooks with images had at least one image missing alt text, making it the single most common accessibility violation in self-published books.
This guide covers the practical rules for images in ebooks: what formats to use, how to size them, how to write effective alt text, and how to handle cover images for every major retailer.
Image Formats: When to Use What
Ebooks support four image formats, each suited to different content types.
| Format | Best For | Compression | Transparency | Max Colors | Typical Size |
|---|---|---|---|---|---|
| JPEG | Photos, complex images | Lossy | No | 16.7 million | 50KB-1MB |
| PNG | Illustrations, screenshots, text | Lossless | Yes | 16.7 million | 100KB-2MB |
| GIF | Simple graphics (legacy) | Lossless | Yes (1-bit) | 256 | 10KB-200KB |
| SVG | Icons, diagrams, decorations | Vector (no compression) | Yes | Unlimited | 5KB-100KB |
JPEG: Your Default for Photographs
Use JPEG for any photographic image, author photos, scene photographs, realistic illustrations. JPEG compression works by discarding visual information that the human eye is less sensitive to. At quality levels of 70-85%, the visual degradation is imperceptible to most viewers while file sizes drop by 80-90% compared to uncompressed data.
Quality setting guidance:
- 85%, High quality, minimal visible artifacts. Use for hero images and photographs that readers will study.
- 75%, Good quality, very small artifacts in detailed areas. Appropriate for most inline photographs.
- 60%, Noticeable quality loss in gradients and fine details. Acceptable for small thumbnails only.
Do not use JPEG for images containing text, sharp lines, or flat colors. JPEG compression creates visible artifacts (smudging, ringing) around hard edges.
PNG: Sharp Edges and Transparency
Use PNG for screenshots, illustrations with flat colors, diagrams with text labels, and any image that requires transparency. PNG is lossless, it preserves every pixel exactly, but files tend to be larger than JPEG equivalents.
PNG is the right choice when:
- The image contains readable text (chapter headers rendered as images, annotated diagrams)
- You need a transparent background
- The image has sharp lines or geometric shapes
- The image has fewer than 256 colors (PNG-8 handles these very efficiently)
SVG: Scalable Graphics
SVG (Scalable Vector Graphics) is an XML-based format that describes shapes mathematically rather than as pixels. This means SVG images scale perfectly to any screen size without losing quality.
Use SVG for:
- Decorative elements (chapter ornaments, section dividers)
- Simple diagrams and flowcharts
- Icons and logos
- Mathematical figures
SVG support in e-readers has improved significantly since 2023. All Kindle devices manufactured after 2020, all Apple Books versions, and Kobo e-readers running firmware 4.30+ render SVG correctly. For maximum compatibility, always include an alt text or a fallback <img> element.
GIF: Generally Avoid
GIF is limited to 256 colors and produces larger files than PNG for most use cases. The only scenario where GIF makes sense in an ebook is a simple animated graphic, but animated content is not supported by most e-readers. Use PNG instead.
Image Sizing Rules
Maximum Dimensions
E-readers have limited screen resolutions. There is no benefit to including a 4000-pixel-wide photograph in an ebook, the e-reader will scale it down, and the oversized file just bloats your EPUB.
| Image Type | Recommended Max Width | Recommended Max Height | Notes |
|---|---|---|---|
| Cover image | 2560px | 1600px | Retailer specs vary (see below) |
| Full-page illustration | 1600px | 2400px | Portrait orientation |
| Inline photograph | 1200px | , | Width constrained |
| Small diagram | 800px | , | Half-width placement |
| Decorative element | 400px | 400px | Scene breaks, ornaments |
CSS Sizing: The Critical Rule
Every image in your EPUB must be constrained by CSS to prevent overflow on small screens. Without this rule, a 1200px-wide image on a 600px-wide phone screen extends beyond the viewport, breaking the layout.
img {
max-width: 100%;
height: auto;
}
This single CSS rule ensures images scale down to fit the screen while maintaining their aspect ratio. It should be in your stylesheet for every ebook, without exception.
For images that should not stretch beyond their natural size (small icons, for example), add:
img.inline-icon {
max-width: 2em;
height: auto;
}
File Size Budgets
Total EPUB file size matters for download speed and retailer upload limits. Amazon KDP has a 650MB limit, but delivery costs increase with file size, Amazon charges approximately $0.15 per MB delivered, which comes out of your royalty.
Target file sizes per image:
- Cover image: under 2MB
- Full-page photographs: under 1MB each
- Inline images: under 500KB each
- Decorative elements: under 50KB each
Total ebook size targets:
- Text-only novel: under 2MB
- Novel with a few illustrations: under 10MB
- Image-heavy non-fiction: under 50MB
- Photography or art book: under 200MB (consider fixed-layout EPUB)
For a broader view of how image handling fits into the EPUB formatting process, see our complete ebook formatting guide.
Alt Text: The Accessibility Requirement
Alt text (alternative text) is a text description attached to an image that conveys its content to people who cannot see it. In the EPUB's HTML, it appears as the alt attribute on <img> elements:
<img src="images/castle.jpg" alt="A medieval castle on a hilltop at sunset" />
Why Alt Text Is Non-Negotiable
Legal requirement. The European Accessibility Act (effective June 2025) mandates alt text for all meaningful images in ebooks sold in the EU. Non-compliance exposes you to enforcement actions that vary by member state.
Amazon ranking impact. Amazon's quality system penalizes missing alt text. Each image without alt text adds approximately 10 points to your suppression risk score, capped at 40 points. A book with four or more missing alt texts on key images can move from Low Risk to Medium or High Risk.
Reader experience. Approximately 2.2 billion people worldwide have some form of vision impairment. Screen readers announce images by reading alt text aloud. Without it, the reader either hears the useless filename ("IMG_2847.jpg") or the image is skipped entirely.
The Rules of Good Alt Text
Be concise. Aim for under 125 characters. Screen readers announce alt text as a single uninterruptible block, long descriptions disrupt the reading flow.
Describe content, not appearance. "A bar chart showing Q4 revenue exceeding Q3 by 15%" is more useful than "A colorful bar chart."
Match the context. The same photograph of a dog might get different alt text depending on context. In a veterinary textbook: "Golden retriever showing signs of hip dysplasia." In a memoir: "Author's childhood pet, Buddy, in the backyard."
Skip decorative images. Ornamental dividers, background textures, and purely decorative elements should have empty alt text: alt="". This tells screen readers to skip them.
For a comprehensive treatment of alt text writing techniques, including examples for different image types, see our dedicated alt text guide.
Alt Text for SVG Images
SVG images in EPUBs require a different approach. Instead of an alt attribute (which <svg> elements do not support), use a combination of <title> and aria-label:
<svg aria-label="Company organizational chart" role="img">
<title>Company organizational chart</title>
<!-- SVG content -->
</svg>
For SVG <image> elements (raster images embedded within SVG):
<svg>
<image href="photo.jpg" aria-label="Team photo at the 2025 retreat">
<title>Team photo at the 2025 retreat</title>
</image>
</svg>
AI-Powered Alt Text Generation
Writing alt text for dozens of images is time-consuming. AI tools can generate initial suggestions that you then review and refine.
Rahatt includes an AI alt text feature that:
- Extracts all images from your EPUB
- Analyzes each image using a vision model
- Reads surrounding book text for context
- Generates alt text suggestions (under 125 characters)
- Lets you review, edit, and approve each suggestion
- Injects the approved alt text back into the EPUB
This approach is significantly faster than writing alt text manually, typically 15-30 minutes for a book with 20+ images, compared to 1-2 hours for manual writing. The AI handles the initial drafting while you retain full editorial control.
Cover Image Specifications by Retailer
Your cover image has the strictest requirements of any image in your ebook because it serves both as an in-book element and as marketing material on retailer websites.
| Retailer | Minimum Size | Recommended Size | Format | Aspect Ratio | Max File Size |
|---|---|---|---|---|---|
| Amazon KDP | 625 x 1000px | 2560 x 1600px | JPEG, TIFF | 1:1.6 | 50MB |
| Apple Books | 1400px shortest side | 2560 x 1600px | JPEG, PNG | 1:1.5 | 25MB |
| Kobo | 1400 x 1873px | 2560 x 1600px | JPEG, PNG | 1:1.33 | 10MB |
| Barnes & Noble | 750 x 1200px | 2000 x 3200px | JPEG | 1:1.6 | 20MB |
| Google Play | 640 x 1024px | 2560 x 1600px | JPEG, PNG | , | 2GB (total book) |
| IngramSpark | 1563 x 2500px | 1563 x 2500px | JPEG | 1:1.6 | , |
Practical recommendation: Create your cover at 2560 x 1600px in JPEG format, which meets or exceeds every retailer's requirements. This single file works across all platforms without modification.
Cover Image in the EPUB
Your cover image should be referenced in the OPF manifest with the cover-image property:
<item id="cover-img" href="images/cover.jpg"
media-type="image/jpeg" properties="cover-image"/>
The cover should also appear as the first content in a dedicated cover XHTML file:
<body>
<figure>
<img src="images/cover.jpg"
alt="Book cover: The Midnight Garden by Jane Smith" />
</figure>
</body>
Note the alt text on the cover image. Many authors forget this, but the cover is an image like any other, it needs alt text. A good pattern is: "Book cover: [Title] by [Author]".
Handling Common Image Scenarios
Tables as Images
If your book contains tables too complex for HTML rendering in e-readers, you may need to convert them to images. When doing so:
- Render the table at high resolution (at least 1200px wide)
- Use PNG format to preserve text clarity
- Write descriptive alt text that summarizes the table's data
- Consider including the table data in a
<details>element for screen reader users
However, always try HTML tables first. Modern e-readers handle basic tables well, and HTML tables are inherently accessible. Only fall back to images for truly complex layouts (merged cells, rotated text, embedded graphics).
Maps and Diagrams
Maps and complex diagrams benefit from a layered approach:
- The image itself (JPEG or PNG at 1200px width)
- Alt text summarizing what the map or diagram shows
- A longer description in the surrounding text or a figure caption
For example:
<figure>
<img src="images/trade-routes.png"
alt="Map of medieval trade routes connecting London, Paris, Venice, and Constantinople" />
<figcaption>Figure 3.1: Major trade routes in the 13th century.
The primary route ran from London through Paris to Venice,
with a secondary route extending to Constantinople.</figcaption>
</figure>
Inline Decorative Elements
Scene break ornaments, chapter decorations, and flourishes are decorative, they add visual interest but convey no information. Mark them with empty alt text:
<div class="scene-break">
<img src="images/ornament.png" alt="" />
</div>
The empty alt="" is not the same as a missing alt attribute. An empty alt tells screen readers "this image is decorative, skip it." A missing alt attribute triggers an accessibility violation.
Image Optimization Workflow
Before adding images to your EPUB, run them through this optimization workflow:
- Resize to the appropriate maximum dimensions (1200-1600px for inline images)
- Compress using an image optimizer:
- Squoosh (free, web-based, excellent quality)
- ImageOptim (free, Mac)
- TinyPNG (free tier, web-based, works for JPEG too)
- Convert to the appropriate format (JPEG for photos, PNG for illustrations)
- Write alt text before inserting the image, it is easier to describe an image while you are looking at it
- Insert into your EPUB with alt text and CSS sizing constraints
- Validate by running the EPUB through Rahatt to check for missing alt text and other accessibility issues
This workflow adds 1-2 minutes per image but can prevent hours of troubleshooting later.
Testing Images Across Devices
Images that look perfect on your computer screen may render differently on e-readers. Test on at least two of the following:
- Kindle Previewer 3 (free), Shows rendering on Kindle devices and app
- Apple Books (Mac/iOS), Renders EPUB natively
- Calibre Viewer (free), Good for quick checks
- Thorium Reader (free), Excellent EPUB 3 support
- Physical e-reader, Nothing replaces testing on the actual device your readers will use
Pay special attention to:
- Images on small screens (phone, 6-inch Kindle), do they scale properly?
- Images with text, is the text readable at small sizes?
- Cover image, does it display correctly on the e-reader's home screen?
- Dark/sepia modes, do images with white backgrounds look jarring?
Frequently Asked Questions
How many images can I include before file size becomes a problem?
There is no hard limit, but keep total EPUB size under 50MB for comfortable distribution. At optimized quality, that allows roughly 50-100 photographs or 200+ illustrations. Amazon's delivery cost ($0.15/MB) is the practical constraint for image-heavy books, a 50MB ebook costs $7.50 in delivery fees per sale, which eats significantly into your royalty. Consider whether you truly need every image at maximum quality.
Should I use WebP format in ebooks?
No, not yet. While WebP offers superior compression compared to JPEG and PNG, e-reader support is inconsistent as of early 2026. Kindle devices released after 2023 support WebP, but older Kindles, Kobo, and some third-party readers do not. Stick with JPEG and PNG for reliable cross-device compatibility. Revisit WebP in 2027-2028 as older devices phase out.
How do I add alt text if my formatting tool does not support it?
Two options: (1) Open your exported EPUB in Sigil and manually add alt attributes to each <img> tag in the XHTML files. (2) Upload to Rahatt and use the AI-powered alt text feature, which generates context-aware suggestions and injects them after your review. Option 2 is faster for books with many images. For detailed alt text writing guidance, see our alt text for ebooks guide.
Do decorative images need alt text?
Decorative images need an alt attribute, but it should be empty: alt="". This is not the same as omitting the alt attribute entirely. An empty alt tells screen readers to skip the image. A missing alt attribute is flagged as an accessibility violation by EPUBCheck, DAISY Ace, and Amazon's quality systems. Every <img> tag must have an alt attribute, the question is whether it contains descriptive text or is empty.
Can I use CMYK images in my ebook?
No. Ebooks require RGB color space. CMYK images (common in print workflows) may display with shifted colors or fail to render entirely on some e-readers. If you are repurposing print images for an ebook, convert them from CMYK to sRGB in your image editor before inserting them. Photoshop, GIMP, and most online image tools handle this conversion. For more on the overall formatting process, see our complete ebook formatting guide.