|
|
#31 |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 51,283
Karma: 179232776
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
For me, the only time I use absolute units for images is for ebook files that intended to be distributed by Amazon AND the author is worried about the minuscule number of people who still use Kindles that require .mobi format.
I do have and use a test epub which uses various ways to display a series of images. If a renderer does not handle that test epub properly, it is a pile of steaming well-aged bovine manure and should not be used. |
|
|
|
|
|
#32 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,916
Karma: 153071045
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
While BookFusion has a subscription model, you can use it without subscribing. It's what I use on my iPhone and iPhad. What do you think makes it a bit basic? Does anyone have a good ePub3 test ePub to try? |
|
|
|
|
| Advert | |
|
|
|
|
#33 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,930
Karma: 9600001
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
The sample I posted is a good epub3 to test; here you have it again:
Alice Sample.epub It has all the code needed to avoid fragmentation, even with "L" images. And the drop cap should look perfect with a proper ereader (no matter the font or the font-size because it uses the property "initial-letter"). |
|
|
|
|
|
#34 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,916
Karma: 153071045
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
|
|
#35 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,930
Karma: 9600001
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
|
|
|
| Advert | |
|
|
|
|
#36 |
|
Enthusiast
![]() Posts: 48
Karma: 10
Join Date: Feb 2026
Device: iPad
|
The SVG wrapper approach mentioned above is probably the most reliable cross-reader solution I've found. Something like:
Code:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 400" width="80%"> <image href="image.jpg" width="600" height="400"/> </svg> |
|
|
|
|
|
#37 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,930
Karma: 9600001
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
I'm afraid of that ereaders that don't support inline svg, they also won't support the property max-width. So you'll have to find another kind of fallback.
|
|
|
|
|
|
#38 | |
|
Enthusiast
![]() Posts: 48
Karma: 10
Join Date: Feb 2026
Device: iPad
|
Quote:
In practice, the fallback chain I've settled on is: 1. SVG wrapper with viewBox (best control over sizing and aspect ratio) 2. CSS max-width: 100%; width: auto; height: auto; on the <img> element (covers anything with basic CSS2 support) 3. HTML width attribute as a percentage directly on the <img> tag (last resort) The key insight for that third level is that the width attribute (not the CSS property) with a percentage value is actually handled reasonably well even by very old EPUB readers, since it's basic HTML rather than CSS. So <img src="cover.jpg" width="80%" /> tends to work even where CSS-based sizing doesn't. You lose fine-grained control with that approach -- you can't set a specific pixel-equivalent size that scales proportionally. But at least the image won't overflow the viewport, which is usually the main concern for readers at that end of the spectrum. |
|
|
|
|
|
|
#39 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 121
Karma: 1000
Join Date: Nov 2025
Device: none
|
It is surly complicate. Sometimes inline style works, othertimes css works, it can vary from device/app or tags. In the end of day you need to test on your subject environment.
|
|
|
|
|
|
#40 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,930
Karma: 9600001
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
<img src="cover.jpg" width="80%" /> And how do you handle your XHTML code to have the image enclosed in an SVG container on one hand, and the fallback code based on the <img> tag on the other? I'd be interested to know how you solved that problem. |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| css if img aspect-ratio >1/1 width:100%, otherwise width:50% | rjwse@aol.com | Editor | 0 | 03-19-2021 07:41 AM |
| 4.11.1 right click img in editor to edit img | rjwse@aol.com | Calibre | 1 | 02-21-2020 09:29 PM |
| change img or box width for multi-column in calibre viewer | rjwse@aol.com | Calibre | 2 | 12-02-2019 10:48 AM |
| Zero-width non joiner vs. zero width space? | Phssthpok | Editor | 3 | 09-06-2015 03:45 AM |
| WIDTH and HEIGHT in <img> tags | Pablo | Sigil | 3 | 06-10-2010 05:37 PM |