Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Complex image handling best practices #39

Open
RachelComerford opened this issue May 9, 2018 · 3 comments
Open

Complex image handling best practices #39

RachelComerford opened this issue May 9, 2018 · 3 comments
Assignees
Labels
Best Practice use for Best Practice documentation questions and suggestions

Comments

@RachelComerford
Copy link
Contributor

From BISG survey

@RachelComerford RachelComerford added the Best Practice use for Best Practice documentation questions and suggestions label May 9, 2018
@JayPanoz
Copy link

Does complex image means image grids, full-bleed, etc.?

@RachelComerford
Copy link
Contributor Author

@JayPanoz in answer to your question:

"I’m just referring to the age-old question of handling portrait images in a wide variety of aspect ratios with a best practices approach that will:
▪ provide “high enough” resolution for zooming
▪ (generally) scale to fit in a page view along with a (short or long) caption
▪ meet A11y standards
▪ work across devices

I’ve been chasing this for a long time, and have a semi-working solution, although it’s far from perfect. I’ve seen Jimmy’s wonderful demos; they are awesome (Hi, Jiminy). They also have a lot of moving parts and are complex.

But because this is for a best practices context, what are clear and direct best practices we can provide ebook producers for image handling that provides a good reader experience and meets requirements? If media queries or “progressive enhancement” with fallbacks are included, then we need to offer some practical step-through, because this is anything but clear and easy. And what works across devices is really going to be the driving element, I believe."

@JayPanoz
Copy link

Mmmkay so first, the bad news: I wouldn’t rule out landscape/square images either as they can find themselves in a tough spot in some configs i.e. one-page + large line-length/width + landscape orientation, in which they can overflow if there’s no max-height set – BTW this is something quite a significant number of Reading Apps end up doing as an override/safeguard so that it can’t happen.

I would also probably divide best practices into 2:

  1. without figcaption
    • global advice
    • landscape/square-specific
    • portrait-specific
  2. with figcaption
    • global advice
    • landscape/square-specific
    • portrait-specific

That’s a simplistic outline, obviously, just recording my thoughts there, as something else could well make more sense.

The backbone would probably be what RS have been doing: setting a max-width and max-height for all images, and using object-fit: contain (MDN doc). We obviously can’t rely on polyfills for EPUB so this is a non-option for RSs that don’t support it. This can only solve the “without figcaption” cases when it’s supported though.

Then I’m open to suggestions/opinions/etc.

I’ve been personally working on this for the last 3 years, did extensive prototypes and experiments, and don’t consider that all the issues are – or even can be – solved to be honest. Needless to say, fresh perspectives are consequently greatly welcome.

@nekennedy nekennedy self-assigned this May 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Best Practice use for Best Practice documentation questions and suggestions
Projects
None yet
Development

No branches or pull requests

3 participants