Electric Book Works Publishing reinvented for the digital age

Images and objects

Where possible, anchor your images. Like floating text boxes, any image that isn’t anchored might not appear next to the relevant text after export to epub. Up to CS4, unless anchored, images and objects will be placed pretty arbitrarily in the ePub (usually at the end in random order). From CS5, InDesign tries to guess where an image should go by its placement on the page – but you might not want to trust it.

Adobe gives this advice for anchoring images:

Anchor each image to its own paragraph. To ensure that an image appears between paragraphs in the EPUB file, it must be anchored to its own paragraph by inserting an extra paragraph return and anchoring the image to that paragraph. You can then apply a paragraph style to the paragraph to further control the image’s position. For example, to center an image and create some space above and below it in the EPUB file, you center-align the paragraph and apply space before and after it. Note: Since text wrap settings are discarded in the EPUB file, you must use the InDesign Space Before and Space After options to add extra space above or below an image.

You may have to work with the images after export anyway.

Also, images you’ve created using drawing tools in InDesign won’t work. You’ll have to save these as image files (e.g. jpg or Illustrator) and place them back in the InDesign document as anchored images.

Unfortunately, an anchored frame can’t contain other frames, so you can’t anchor an image and a caption in the same anchored object. To add a caption, you’re going to need to get at the XHTML code. (We won’t go into that code here, but if you every need it, let us know; it can be done.)

Finally, if you have very large images in your book, you may need to resize them, because some devices can’t display images larger than 10MB. (In InDesign CS4 you can choose to have InDesign automatically resize your images when you export to epub, which saves you the hassle.)

Arthur Attwell 17 February 2010
This information is more than two years old, and may no longer be accurate.