v1.27.0

gildas-lormeau/SingleFilev1.27.0Sep 27, 2026by gildas-lormeau

Upgrading?

AI Summary

This release introduces a new configuration option for image quality during resizing, removes an ineffective CSS compression feature, and updates the underlying single-file-core library. It also includes numerous bug fixes related to font fetching, image handling, shadow root restoration, and resource embedding.

Key Highlights

  • New 'imageQuality' option (0.8 default) to control JPEG/WEBP re-encoding quality.
  • Removed 'compress CSS content' option as it had no effect since core 1.6.15.
  • Fixed fonts served only with Referer being dropped from the saved page.
  • Fixed referrerpolicy attribute application during resource fetching.
  • Fixed resizing logic to prevent larger images from replacing originals.

Breaking Changes

  • Removed 'compress CSS content' option.

New Features

  • New 'imageQuality' option for resized images.

Full Release Notes

### Changes

- New option "quality of resized images" (`imageQuality`, 0.8 by default): the quality used to re-encode the JPEG and WEBP images resized with "image reduction factor". With 1, WEBP images are saved without loss. The field is disabled while the image reduction factor is 1
- The option "compress CSS content" is removed. It has had no effect since single-file-core 1.6.15: on 24 real pages (38.4 MB of CSS), it took 3.4 seconds to save 0.015% (5,850 bytes), made 6 of them larger, and could move background images (`background:none` became `background:0`)
- The help of "image reduction factor" now explains that images whose size is not set by the page (e.g. icons, logos) are displayed smaller
- single-file-core is updated from 1.6.14 to 1.6.19, see https://github.com/gildas-lormeau/single-file-core/releases/tag/v1.6.15, https://github.com/gildas-lormeau/single-file-core/releases/tag/v1.6.16, https://github.com/gildas-lormeau/single-file-core/releases/tag/v1.6.17, https://github.com/gildas-lormeau/single-file-core/releases/tag/v1.6.18 and https://github.com/gildas-lormeau/single-file-core/releases/tag/v1.6.19

### Fixes

- A font stylesheet served only with the page's `Referer` (e.g. the Sentinel fonts of authorsguild.org) was dropped from the saved page. When the fetch of a `<link>` stylesheet fails, the rules loaded by the page are now used instead
- The `referrerpolicy` attribute of `<img>`, `<source>`, `<link>` and `<script>` elements is now applied when fetching them, and no `Referer` is sent for a resource of a stylesheet whose `Referrer-Policy` gives none
- With "image reduction factor" set, a resized image is no longer kept when it is larger than the original (e.g. small icons and avatars), the images of `<canvas>` elements are resized too, the images of `background` attributes are no longer resized, and an SVG `<image>` without size keeps its displayed size
- When the encoding of a resized image failed, the save never ended
- A page whose content is an exact multiple of 16 MiB (e.g. 32 MiB) was never saved, and a page of an exact multiple of 32 MiB never opened in the annotation editor (#2004)
- A shadow root created with `delegatesFocus` or with manual slot assignment was not restored as such in the saved page
- The `<source>` elements and the `environmentmap` attribute of `<model>` elements are now embedded
- Resources with no expected type (e.g. a PDF in an `<object>`) were requested with the header `Accept: undefined`
- The removal of unused styles removed vendor values the browser does not support (e.g. `-moz-` values in Chrome), fallback values written before a newer value, the values `revert-rule` rolls back to, the rules in `@when` / `@else`, and could lower the specificity of nested rules
- A `data-single-file-stylesheet` attribute was left on some `<style>` elements of the page after saving it

Related Repositories