@nera-static/plugin-images 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/README.md +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.1] - 2026-10-09
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- README: a missing `alt` is reported by `nera check` (output rule
|
|
13
|
+
`a11y-img-alt`), not by `nera validate`; the CI cache snippet uses
|
|
14
|
+
`actions/cache@v6`; the `og:image` snippet says that `app.origin` comes
|
|
15
|
+
from the `origin` key in `config/app.yaml`
|
|
16
|
+
|
|
8
17
|
## [1.0.0] - 2026-10-09
|
|
9
18
|
|
|
10
19
|
### Added
|
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ Without the plugin, this is a bare `<img src="/images/blog/2026/zerpensafari-iph
|
|
|
52
52
|
</picture>
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
The `<img>` fallback keeps the source's own format (JPEG stays JPEG, PNG stays PNG; AVIF and TIFF fall back to JPEG) and always points at a processed variant, never the original. Widths are never upscaled. `width`/`height` are the largest variant's size, so the browser reserves the right space before the image loads (no layout shift). Every attribute you set on the original `<img>` (`alt`, `class`, `id`, `data-*`, …) is kept. A missing `alt` stays missing: [`nera
|
|
55
|
+
The `<img>` fallback keeps the source's own format (JPEG stays JPEG, PNG stays PNG; AVIF and TIFF fall back to JPEG) and always points at a processed variant, never the original. Widths are never upscaled. `width`/`height` are the largest variant's size, so the browser reserves the right space before the image loads (no layout shift). Every attribute you set on the original `<img>` (`alt`, `class`, `id`, `data-*`, …) is kept. A missing `alt` stays missing: [`nera check`](https://nera.js.org) reports it (rule `a11y-img-alt`), the plugin does not invent one.
|
|
56
56
|
|
|
57
57
|
On the field-test site (a German/English blog), the 32 content images went from 4.2 MB of originals to 0.45 MB of AVIF a phone downloads, and the Lighthouse mobile LCP of a blog post dropped from 3.5–3.8 s to 2.6 s; with its teaser image rendered through the mixin as well (see below), to 1.8–1.9 s.
|
|
58
58
|
|
|
@@ -181,7 +181,7 @@ Options: `alt`, `class`, `sizes` (for a column layout, e.g. `'(min-width: 60em)
|
|
|
181
181
|
|
|
182
182
|
### `og:image`
|
|
183
183
|
|
|
184
|
-
Core's `base_path` rewriting does not touch `<meta content>`, and `og:image` must be an absolute URL anyway, so add your origin (and `base_path`, if you use one) in the template:
|
|
184
|
+
Core's `base_path` rewriting does not touch `<meta content>`, and `og:image` must be an absolute URL anyway, so add your origin (and `base_path`, if you use one) in the template. `app.origin` is the `origin` key of your `config/app.yaml` (for example `origin: https://example.com`); core does not set it for you:
|
|
185
185
|
|
|
186
186
|
```pug
|
|
187
187
|
if meta.images && meta.images.image && meta.images.image.og
|
|
@@ -222,7 +222,7 @@ A cold build of a site with ~100 images takes a minute or more, because AVIF enc
|
|
|
222
222
|
|
|
223
223
|
```yaml
|
|
224
224
|
# GitHub Actions, before `npm run build`
|
|
225
|
-
- uses: actions/cache@
|
|
225
|
+
- uses: actions/cache@v6
|
|
226
226
|
with:
|
|
227
227
|
path: .nera-cache
|
|
228
228
|
key: nera-images-${{ hashFiles('assets/**', 'theme/assets/**', 'config/images.yaml') }}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nera-static/plugin-images",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "A plugin for Nera static site generator to generate responsive, modern-format images (AVIF/WebP, srcset, width/height, lazy loading) at build time.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|