• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Reflowable Epub image setting for landscape and portrait

New Here ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

Thanks to everyone who posts here.  I've found a wealth of information.  Thanks to NitroPress for the step-by-step tutorial and helpful book.

 

After reading these threads and much experimentation, I was able to get a full-screen image to acceptably display in the Kindle Previewer for the phone, tablet, and Kindle on portrait view.  HOWEVER, when I change to landscape view, the image gets cropped rather than resized.  

 

There must be a way to do this since InDesign exports the cover page correctly, i.e. it shows the image as big as it can given the current screen orientation.  Anyone know the setting or exact CSS code I need to change to have the image resize for landscape mode.  See screenshots.

TOPICS
EPUB , How to

Views

294

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 19, 2024 Sep 19, 2024

I just did some (admittedly quick and hacky) testing, but it looks as if nothing that allows an image to be left-right full margin in size in portrait mode will correctly display the image when rotated to landscape. Only a hard scaling of 50-60% or less, using Custom Width, will keep the image small enough to show in both orientations.

 

I made a note to keep trying various workarrounds, but it looks as if it really is a gap in Kindle's capabilities, based on the lack of the viewport-scaling opt

...

Votes

Translate

Translate
Community Expert ,
Sep 18, 2024 Sep 18, 2024

Copy link to clipboard

Copied

I hate to undo the kind comments, but... not really. Kindle has the limitation of not 'respecting' the vh and vw (and vmin/vmax) size parameters, so you can't set things like image sizing to be responsive to screen orientation. Everything about rendering is in deep Kindle code, not accessible to document creators (that is, you can't write conditional code as you can for web pages). It also shares the common problem of not recognizing height as a screen value, only as an absolute (fixed) size setting.

 

I might tinker with this over the next few days to see if there's a workaround, if things have changed or if I just missed something. But this is a pretty fundamental Kindle glitch, something even most EPUB readers can handle easily but for some reason, Kindle just doesn't know up from sideways.

 

You might try 'Relative to Text Flow' on some test images, to see if, at least, that's responsive to the screen orientation. Probably not.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 19, 2024 Sep 19, 2024

Copy link to clipboard

Copied

Thanks James.  I've spent hours banging my head against this wall.

 

It must be possible in some way, otherwise how would the cover image display properly?  

 

I discovered if the app setting for the book is set to "continuous scrolling" (which I assume it will be for most people reading in landscape on a phone screen) the entire image displays correct as you scroll.  

 

Thanks for letting me know if you find another hack.  Thanks so much for your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 19, 2024 Sep 19, 2024

Copy link to clipboard

Copied

I just did some (admittedly quick and hacky) testing, but it looks as if nothing that allows an image to be left-right full margin in size in portrait mode will correctly display the image when rotated to landscape. Only a hard scaling of 50-60% or less, using Custom Width, will keep the image small enough to show in both orientations.

 

I made a note to keep trying various workarrounds, but it looks as if it really is a gap in Kindle's capabilities, based on the lack of the viewport-scaling options. And yes, the root problem is how Kindle (or any other EPUB reader with the option) handles continuous-scroll vs. virtual pagination. So maybe it's not a huge problem for those used to reading stuff on small screens. (Yeah... that's the ticket.)


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 19, 2024 Sep 19, 2024

Copy link to clipboard

Copied

LATEST

Appreciate your efforts and appreciate your rosources @James Gifford—NitroPress 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines