pressbooks-book icon indicating copy to clipboard operation
pressbooks-book copied to clipboard

EPUB: Left- and right-aligned small images are larger than expected

Open greatislander opened this issue 5 years ago • 3 comments

Description

Left- and right-aligned small images are scaled up to 50% of page width in EPUB exports. We should investigate and find a way of resolving this issue.

Steps to Reproduce

  1. Insert small images (less than 50% of page width), and align them left and right.

Expected behavior: Left- and right-aligned small images appear at their intrinsic size.

Actual behavior: Left- and right-aligned images are never less than 50% of page width.

greatislander avatar Feb 25 '19 14:02 greatislander

Reproducible, Buckram. The image in the screenshot below should be a thumbnail, but it's so blown up that it's blurry even before the ebook media quality has been manually decreased.

Screen Shot 2019-12-16 at 2 56 37 PM

Example: https://tinytinyimage.textopress.com/

mcgratay avatar Dec 16 '19 19:12 mcgratay

Image width appears to be set to 100% generally and then downsized to 50% for floated images: https://github.com/pressbooks/buckram/blob/5721a4a1b8dcb9cf7e7fa743d3ac5a9a44b4d885/assets/styles/components/media/_images.scss#L64-L85. Not sure why. Git blame offers little context. @greatislander do you have any backstory on this?

SteelWagstaff avatar Dec 17 '19 13:12 SteelWagstaff

Related to https://github.com/pressbooks/pressbooks-book/issues/850

SteelWagstaff avatar Sep 01 '21 16:09 SteelWagstaff