Images in EPUB Files

Every image in an EPUB must be declared in the OPF manifest, referenced correctly in content files, and include alt text. A missing manifest entry is one of the most common causes of EPUB validation failures. A missing alt attribute on an img element causes Apple Books to reject the file at submission. This guide covers image formats, how to add images to chapter content, the special cover image declaration, and what validators check.

Image formats — what's safe and what to hedge

The EPUB specification defines a set of core media types that all reading systems must support. JPEG and PNG are in the core set. Other formats have varying support:

FormatSupportmedia-typeNotes
JPEG / JPGSupportedimage/jpegSafe for all platforms. Use for photos and complex images with gradients.
PNGSupportedimage/pngSafe for all platforms. Use for illustrations, diagrams, and images with transparency.
GIFVariableimage/gifStatic GIF works in most readers. Animations are generally not rendered — e-readers do not play animated GIFs.
SVGVariableimage/svg+xmlSupport varies significantly by reading system. Not safe for all platforms — test before relying on SVG.
WebPAvoidimage/webpNot part of the core EPUB image format specification. Avoid for maximum compatibility.

Inline images in chapter content

Images appear in chapter XHTML files using a standard <img> element. The src path is relative to the content file's location in the archive:

<!-- In a chapter XHTML file -->
<img src="../Images/chapter01-illustration.jpg"
     alt="A map of the island showing the three villages"/>

Every image referenced in content files must also be declared in the OPF manifest:

<!-- In content.opf, inside <manifest> -->
<item id="img-chapter01"
      href="Images/chapter01-illustration.jpg"
      media-type="image/jpeg"/>

<item id="img-diagram"
      href="Images/diagram.png"
      media-type="image/png"/>

An image present in the archive but not in the manifest triggers a "missing manifest resource" validation error. An image referenced in a content file but physically absent from the archive also fails validation. Both must match.

Cover image — the special manifest declaration

The cover image requires a specific properties="cover-image" attribute on its manifest item. This is what tells KDP and Apple Books which image to display in their store listings and library views. Without it, the cover image may be physically present but not recognized — resulting in a blank or default cover on the store page:

<!-- In content.opf, inside <manifest> -->
<!-- The image file itself gets properties="cover-image" -->
<item id="cover-image"
      href="Images/cover.jpg"
      media-type="image/jpeg"
      properties="cover-image"/>

<!-- The cover XHTML page is a separate item without that property -->
<item id="cover-page"
      href="cover.xhtml"
      media-type="application/xhtml+xml"/>

The properties="cover-image" attribute goes on the image file item, not on the XHTML page that displays it. A cover.xhtml file may contain the cover image via an <img> tag, but it is the image item in the manifest that needs the property.

Alt text — required, not optional

Every <img> element in an EPUB must have an alt attribute. Apple Books enforces this requirement and rejects EPUB files where img elements are missing alt attributes. The attribute serves two purposes: it describes the image to screen readers, and it provides text if the image fails to load.

<!-- Image that conveys meaning — describe it -->
<img src="../Images/chart.png"
     alt="Bar chart showing annual sales by region from 2020 to 2024"/>

<!-- Purely decorative image — use empty alt to skip in screen readers -->
<img src="../Images/divider.png" alt=""/>

The distinction matters: a missing alt attribute is an error. An empty alt="" is valid — it explicitly signals that the image is decorative and should be ignored by assistive technology.

Image sizing and file size

E-readers display images at the screen's native resolution — very high-resolution images add file size without visible benefit on most devices. For interior images, a resolution that matches common e-reader screen densities is sufficient; you do not need print-quality 300 DPI images in an ebook.

KDP and other platforms have upload size limits for EPUB files. Very large image files — especially uncompressed PNG files — are the most common cause of oversized EPUBs. Compress images before including them in your EPUB, particularly JPEGs where quality above 80–85% is rarely visible on e-ink screens.

For specific file size limits and cover image dimension requirements, check current KDP and Apple Books documentation — these numbers change and any specific figure here may be outdated.

Frequently asked questions

What image formats are safe to use in EPUB?

JPEG and PNG are the safe choices for EPUB images — both are in the EPUB core media types specification and supported across all major reading systems. GIF works for static images but animations are not rendered by e-readers. SVG support varies significantly across reading systems; if you need to use SVG, test your file on the specific platforms you are targeting. WebP is not in the EPUB core media types and should be avoided.

Does every image in my EPUB need alt text?

Yes. Every <img> element in your EPUB content files requires an alt attribute. Apple Books has enforced this requirement since 2022 — files with img elements missing alt attributes are rejected at submission. KDP is more permissive, but omitting alt text also breaks accessibility for screen reader users. Use a descriptive alt value for images that convey meaning; use an empty alt="" for purely decorative images to indicate they should be skipped by assistive technology.

How do I declare the cover image in the OPF?

The cover image must be declared in the OPF manifest with properties="cover-image" on the item element. This is separate from the cover.xhtml content file — the properties attribute marks the image file itself, not the HTML page that contains it. Missing this declaration is one of the most common EPUB errors: the image is present in the archive but not flagged as the cover, so KDP and Apple Books show a blank cover in store listings.

What size should interior images be in my ebook?

Interior image sizing recommendations vary by platform and device. In general, keep individual image file sizes small to avoid large EPUB archives — very large EPUBs can fail upload size limits. For image pixel dimensions, e-readers display images at the screen's native resolution, so very high-resolution images add file size without visible benefit on most devices. Check current KDP and Apple Books documentation for their current file size guidelines, as these change.

Can I use SVG images in EPUB?

SVG is in the EPUB 3 core media types specification, but support in reading systems varies. Some platforms render SVG inline images correctly; others do not. If you use SVG, declare it in the OPF manifest with media-type="image/svg+xml". For critical images — chapter headers, illustrations — use JPEG or PNG instead to ensure they render on all platforms. SVG is more reliably supported when used as a fallback or for simple decorative graphics.

My EPUB validator says "missing manifest resource" for an image — what does that mean?

A "missing manifest resource" error for an image means one of two things: either the image is referenced in a content file (via <img src="...">) but not declared in the OPF manifest, or the image is declared in the manifest but the actual file is absent from the EPUB archive. Fix: open your OPF manifest and confirm every image that appears in your XHTML files has a corresponding <item> entry with the correct href path and media-type. Then confirm the image file itself exists at that path inside the archive.

For the full EPUB build workflow — manuscript cleanup, TOC, metadata, and platform submission — see the EPUB formatting guide. For EPUB OPF metadata — the manifest and package document structure that declares all files including images — see the EPUB metadata guide. For alt text and other accessibility requirements, see accessible EPUB.

For image-related validation errors — missing manifest resource, cover image not declared, missing alt text — see the EPUB error reference.

Validate your EPUB — free, including image and manifest checks.

Checks image references, cover image declaration, missing manifest resources, and alt text — no Java, no install, runs in the browser.

Validate Your EPUB Free →