Search code examples
epubimage-scalingcoverimage-size

What is the proper image size for an ePub cover page?


I am using the most excellent PHP library ePub to on-the-fly create digital books from HTML stored in my database.

As these are part of a collection, I am including a cover image for every book. Everything works fine in the code but depending upon the device/software interpreting the ePub, the image may get cut off. I have seen 600x800 pixels as a recommended size, but it still cuts it off (for example in Aldiko in Android). Is there a standard size that is recommended in the documentation?

Honestly, I would love a good and readable recommendation for documentation of the ePub format.


Solution

  • So, it seems that Aldiko has the problem, and not the other e-Readers I have tested (Calibre, Overdrive).

    After trying various ratios, I found that Aldiko only respects the height:100% style I have called out in the height direction. It doesn't scale the image, only sets the height at 100% of the screen width. I am going to have to go with this being a bug in Aldiko, and keep the recommended 600x800 ratio for maximum resolution.

    Another interesting thing I discovered as well; the Aldiko reader didn't recover as well from non-standard HTML. On one of the database entries, a <style> tag inside the <body> disappeared, but the style text did not. This is not the same for the other e-Readers.

    The best general advice I found on the internet is Preparing Images for Ebooks Project (PIFEP).