how to include online image in epub3

7 posts / 0 new
Last post

I want to include online images in my EPUB3 file but when i validate it it shows me error "Only audio and video remote resources are permitted".

As per that message, the only exception to the requirement that resources be included in the container is for audio and video files (and metadata records linked from the package document). At this time, you can only link out to other web-hosted resources, not pull them into your publication.

EPUB may become more of a distributed format in the future, where resources can live anywhere on the web, but audio and video were the only resources given an exception in 3.0 because of potential file size issues and because with video you may have to provide more than one encoding.

when i tried to include images in epub3 using javascript it is working fine in Android e reader but images are not shown in iBooks.

Right, because there's no guarantee of scripting or, when scripting is available, that you'll have access to the network. That's why workarounds to the restriction are prone to failure at this point, and why it's noted in the specification that publications must not rely on scripting in order to be fully consumable. Dynamic ads, where a placeholder will do in situations where remote retrieval is not possible, are about the extent of what you might want to try with scripting, since they aren't critical to the primary narrative. It's not a good practice to try for content given the current limitations and restrictions.

The situation may be clarified/improved in the coming revision (or another), but for now only audio and video can safely live remotely and be expected to be retrieved.

Thanks for the information. This really helps. Does that imply that apart from audio and video, even the live twitter and RSS feeds would also not be retreived (with the help of scripting) in iBooks?

Right, as far as I'm aware all remote data access is restricted. Neither XmlHttpRequest nor JSON calls work within iBooks that I've found or heard.

Adding a P to the end of JSON in the above, of course.

Secondary menu