Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-15-2026, 12:29 AM   #31
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
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.
DNSB is online now   Reply With Quote
Old 02-15-2026, 04:48 AM   #32
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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:
Originally Posted by RbnJrg View Post
In that case, I must say you don't know how to use them properly. Cantook, Reasily, and PocketBook aren't just good e-readers; they're convenient and very easy to use. I can concede that while Lithium, BookFusion, and Infinity Reader display epub files well, they might be a bit basic (and Kobo for Android is quite basic, even though its epub3 support is great), but the other apps are very good.



Well then, I must say—and please don't take this the wrong way—that you don't know much about epub. No, the application you use to open an ebook is not irrelevant. Why don't you try opening the sample chapter I'm attaching in Cantook, Reasily, or Lithium and see what you get? Then do the same in FB Reader or Moon+. There's a world of difference (and try changing the font size)! The reading experience on the e-readers I recommend is infinitely superior to what you can get on FB Reader and Moon+ (although I acknowledge that Readest, as a derivative, a fork of Foliate, can display an epub well, it is no easier to use than the readers I recommend).



Cantook, Reasily, Lithium, PocketBook are also free and easier to use than Readest.

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?
JSWolf is offline   Reply With Quote
Advert
Old 02-15-2026, 10:16 AM   #33
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,930
Karma: 9600001
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
Does anyone have a good ePub3 test ePub to try?
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").
RbnJrg is online now   Reply With Quote
Old 02-15-2026, 04:59 PM   #34
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
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:
Originally Posted by RbnJrg View Post
The sample I posted is a good epub3 to test; here you have it again:

Attachment 221023

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").
Thank you! It works well in Thorium.
JSWolf is offline   Reply With Quote
Old 02-16-2026, 11:45 AM   #35
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,930
Karma: 9600001
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JSWolf View Post
Thank you! It works well in Thorium.
No problem!
RbnJrg is online now   Reply With Quote
Advert
Old 02-28-2026, 08:25 AM   #36
QuietShelfLife
Enthusiast
QuietShelfLife began at the beginning.
 
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>
This lets you define the aspect ratio in the viewBox while controlling the display size with a percentage width on the SVG element itself. Most readers handle SVG sizing much more consistently than they handle img with absolute units. The fallback for readers that don't support inline SVG is just to use max-width in % and accept that you lose fine-grained sizing control on those platforms.
QuietShelfLife is offline   Reply With Quote
Old 03-01-2026, 11:19 AM   #37
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,930
Karma: 9600001
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by QuietShelfLife View Post
...The fallback for readers that don't support inline SVG is just to use max-width in % and accept that you lose fine-grained sizing control on those platforms.
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.
RbnJrg is online now   Reply With Quote
Old 03-04-2026, 08:05 AM   #38
QuietShelfLife
Enthusiast
QuietShelfLife began at the beginning.
 
Posts: 48
Karma: 10
Join Date: Feb 2026
Device: iPad
Quote:
Originally Posted by RbnJrg View Post
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.
That's a fair point -- you're right that if a reader chokes on inline SVG, its CSS support is probably limited enough that max-width won't help either.

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.
QuietShelfLife is offline   Reply With Quote
Old 03-04-2026, 09:42 AM   #39
icearch
Zealot
icearch can extract oil from cheeseicearch can extract oil from cheeseicearch can extract oil from cheeseicearch can extract oil from cheeseicearch can extract oil from cheeseicearch can extract oil from cheeseicearch can extract oil from cheeseicearch can extract oil from cheese
 
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.
icearch is offline   Reply With Quote
Old 03-04-2026, 08:11 PM   #40
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,930
Karma: 9600001
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by QuietShelfLife View Post

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)
But with that aproximation, the width of the element will be controlled by:

Code:
<img src="cover.jpg" width="80%" />
That statement will have priority over the css properties.

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.
RbnJrg is online now   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 10:52 PM.


MobileRead.com is a privately owned, operated and funded community.