Skip to content

HTML book: light images for the web (quality option, no image precache) #17

Closed

Description

@apiad

An illustrated HTML book downloads every image on the first visit: the service worker precaches every file, and the reader's page-counting strip loads each chapter's HTML, which fetches its images. A book with 245 illustrations is about 46 MB before the reader turns a page.

Proposal, as two html output keys:

  • image-quality (default 80): the WebP quality, today fixed at 80.
  • offline-images (default true, today's behaviour). With false, img/ leaves the precache list, images get loading="lazy" decoding="async" so the hidden counting strip does not fetch them, and the worker caches each image when it is first fetched, so pages already read keep their images offline.

Page counting is unaffected: every image already carries its intrinsic width and height.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions