![]() |
#1 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Feb 2019
Device: MacBook and iPad
|
Issue with adding images in epub
Sometime ago I discovered that the way Sigil added illustrations (images) in a chapter they didn’t resize, at least in iBooks, so after a bit of trial and error I’m now using the following sample code:
[and yes, I’ve read the old thread] ——————————— <p>Even Elleen paused from eavesdropping on the telephone party line to laugh and say, “You men are so dumb.”</p> <div style="text-align: center; padding: 0pt; margin: 0pt; line-height: 100%;"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="66.67%" viewBox="0 0 600 400" preserveAspectRatio="xMidYMid meet"> <image width="600" height="400" xlink:href="../Images/C02Ilus05.png"/> </svg> </div> <p>In a brown study, Calan was down with the dog by the cooling stove, back to thinking about how he might sidetrack their will to start … ——————————— It’s not a satisfactory solution though, because now where the illustrations display and resize as intended in iBooks (MacOS and IOS), and resize properly in the likes of ADE and Calibre viewer, they don’t display properly in the latter. By not displaying properly in the latter, I mean that there is excess white space before and after each illustration. [See screenshots below] What the heck am I missing? Thank you iBooks screenshot ![]() ADE screenshot ![]() Last edited by klgc; 03-29-2019 at 01:07 AM. |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
Quote:
I think the solution is to remove the width="100%" and height="66.67%" from the <svg> and add this to your CSS stylesheet instead: Code:
svg { width:100%; max-width:100%; height:auto; max-height:100%; } Code:
style="width:100%; max-width:100%; height:auto; max-height:100%;" Last edited by GeoffR; 03-29-2019 at 05:52 AM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 9
Karma: 10
Join Date: Feb 2019
Device: MacBook and iPad
|
Thank you, that seems to have cleared up this issue :-)
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
tips for adding images in epub | hapax legomenon | ePub | 37 | 01-16-2024 06:38 PM |
Adding Images | JP91306 | Editor | 1 | 07-06-2018 04:41 AM |
Adding Thumbnail images to epub for nook hd | CrbrlAssazn | Barnes & Noble NOOK | 4 | 10-04-2014 09:54 AM |
Adding Epub to Calibre Issue | Arkayas | Library Management | 0 | 05-16-2011 12:04 PM |
Issue 501: images with same name in different directories collide in final epub file | Ray Tayek | Sigil | 32 | 11-27-2010 01:46 AM |