You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HTML book: light images for the web (quality option, no image precache) #17
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