ePub file size and image optimisation


For A3 I simply resized images to target monitor viewing at full-size and didn’t experiment with jpg quality. The ePub file size quickly bloated and there was some evidence of lag when using Adobe’s online publish facility. I realised that this was something that would require further thought and I perhaps have a mental block when it comes to deliberately degrading image quality.

The target output is important – for the purposes of my ebook, I am initially focusing on monitor displays (as this will be the assessment platform). However, if I later produce a book for iPad (arguably the only mobile screen appropriate for viewing ephotobooks), I will also need to reconsider image optimisation.

From my research, there are two areas that require some practical research.

I currently use Lightroom user presets to export images to a size / quality and think this is probably adequate for online purposes. I use Photoshop when working with printed output. However, apparently Photoshop’s ‘export for web’ allows for the previewing and comparison of up to four different export settings. This is ideal for testing what Jpeg quality / file sizes are optimal for the ePub. I think they are currently over-specd. Something also important when I start to move images on to a microsite.

My image long-sides were targeted at just over 2000 px on the long-side. For iPads with retina displays, 2048 px on the long-sided is recommended by Apple (here – https://support.apple.com/en-gb/HT202751) so this seems a good compromise for monitor and iPad that would avoid the need to generate fresh images for an iPad version of my book.

There is plenty to be going at here to optimise the viewing experience. With so many variables at the viewing end (including internet speed) I need to do some testing an make some changes in this area.


Screen grab – export for web from Photoshop

I found ‘export for web’ useful for comparing jpg quality with various settings, using a preview of the resized image. Having examined the whole of the image ’80 quality’ works well for me – less than half the file size of 100 and little discernible different (though I think a little subtlety is lost in the sky details).

For image resizing I chose ‘bicubic sharper’, which apparently retains sharpness when image sizes are reduced. However, when exporting from LR there is no user choice of resizing algorithm. I couldn’t locate official information on this but read ‘Adobe Photoshop Lightroom resampling is a hybrid Bicubic algorithm that interpolates between Bicubic and Bicubic Smoother for upsampling and Bicubic and Bicubic Sharper for downsampling.’ (from – https://www.digitalphotopro.com/technique/photography-workflow/the-right-resolution/2/, who seems to have had technical involvement with Adobe). In any case, a test export from LR at 80 jpeg quality resulted in similar file size to PS’s and a good quality image.

The final point I considered was pixel dimensions. If 2048 on the long side is recommended, there is also a maximum short size to fit on a 16:9 screen. A quick calculation determines this to be 1152. Depending on the dimension of the image, it should either be restricted to 2048 long side or 1152 short size to be optimised for full screen viewing on 16:9. I found with my uncropped images this turns out to be 1152, which gives a small additional reduction in file size. I’ve set all this up as a LR export preset for future exports for ePub purposes.

Quick references

Different file types / compression – https://matthews.sites.wfu.edu/misc/graphics/formats/formats.html

Optimising images for ebooks – https://blog.kotobee.com/optimize-images-ebook/