Keep the following in mind when preparing images:
All images should be prepared in digital format and should not contain any text. All text must be created using HTML. Embedding text in images creates issues that cause a large number of customer complaints: customers can’t use the dictionary or search the text, and in addition, the book becomes not accessible for persons using the VoiceOver feature. Therefore, books with images that contain embedded text are rejected from sale on Apple Books.
JPEG with .jpg
or .jpeg
extension (quality unconstrained) or PNG with .png
extension.
RGB (screen standard).
Note: Apple recommends that you set the colorspace on your book images to sRGB. This colorspace functions best on hardware.
Images that have any transparent areas should be PNG format or, ideally, use JPEGs with WebKit PNG masks. Images that do not have transparency should be JPEGs.
Be sure to preview your book in night mode. In night mode, the transparent areas of an image are black. If your image has dark text within a transparent image, that text could be difficult to read in night mode. Instead, we suggest you use a JPEG with a white background.
Images within the EPUB cannot exceed 5.6 million pixels. Apple recommends providing images that are at least 1.5 times the intended viewing size, up to a maximum of 5.6 million pixels. To calculate whether an image inside the book file exceeds 5.6 million pixels, multiply the height of the image by the width.
In flowing EPUB books, it is recommended to size images using viewport units to maintain adaptability for various screen sizes. For example:
HTML:
<img src="images/bears.jpg" alt="three bears peer at Goldilocks"/>
CSS:
img { height: 50vh;}
Images should be defined using img
tags in the HTML. Styles such as dimensions and positioning should be defined in the CSS.
To ensure proper viewing of images in content, use the HTML img
tag instead of wrapping images in svg:image
.
The maximum recommended size is about 10 MB of un-encoded image data per XHTML file.
Make sure all images are accessible. See Accessibility for information.
Apple recommends that you run final image assets through image optimizations, such as ImageOptim (which is a free, open source optimization tool).
Gaiji are small, inline images that represent characters that are not available in a character or font set. Gaiji are typically used for older symbols or characters in Japanese that have fallen out of use. Apple Books controls image dimensions to ensure that images fit on the page, but with Gaiji, you may want to define a specific image size. You can use one of two different mechanisms to ensure the image dimensions you define are respected. Use these mechanisms only for small, inline Gaiji. Be sure to test these images on a small screen like an iPhone. Gaiji images should have transparent backgrounds for optimum display across themes.
If a book is written in Japanese, follows the EBPAJ guide, and has one or more class names that contain the term "gaiji", then Apple Books respects the dimensions for the images that have class names containing the term "gaiji". For example:
Written in Japanese
<metadata>
. . .
<dc:language>ja</dc:language>
. . .
</metadata>
Follows EBPAJ guide 1.0 or 1.1
1.0:
<metadata>
. . .
<dc:description id="ebpaj-guide">ebpaj-guide-1.0</dc:description>
. . .
</metadata>
1.1:
<metadata>
. . .
<meta property="ebpaj:guide-version">1.1</meta>
. . .
</metadata>
Class name(s) on the image element that is either equal to "gaiji", or is prefixed with "gaiji-"
img.gaiji {
width: 1em;
height: 1em;
}
img.gaiji-line {
width: 1em;
height: auto;
}
img.gaiji-wide {
width: auto;
height: 1em;
}
Custom Class Name: If the book is not defined as following the EBPAJ guide, you can define a custom class name for which Apple Books will respect an image's dimensions. The custom class name is defined in the metadata section of the package document (.opf
) file, and requires the inclusion of the ibooks
prefix in the package element. For example:
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" version="3.0" prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/">
. . .
<metadata>
. . .
<meta property="ibooks:respect-image-size-class">gaiji</meta>
. . .
</metadata>
</package>
Note: Mechanism 2 takes precedence over Mechanism 1. In other words, if a custom class is defined, then Apple Books will respect dimensions for that class, and not search for class names that include "gaiji".
To make the gaiji image accessible for readers who use VoiceOver, do one of the following:
When gaiji is used to display a character that is not available in a particular font, the alternative text should be the unicode character.
When gaiji is used to represent an image similar to emoji, use a short description of the image's content (for example, "thumbs up", "sunrise", or "smiling woman").
When gaiji is used to represent a new or made-up character that does not exist in the font and has no unicode representation, use the phonetic Hiragana or Katakana string in the alternative text to represent the pronunciation of the new or made-up character.