pressbooks / pressbooks-book

McLuhan is the default book theme for Pressbooks.
https://pressbooks.org
GNU General Public License v3.0
20 stars 16 forks source link

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

Open greatislander opened 5 years ago

greatislander commented 5 years ago

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.

mcgratay commented 4 years ago

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/

SteelWagstaff commented 4 years ago

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 commented 3 years ago

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