@nera-static/plugin-images 1.0.0 → 1.0.2

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 CHANGED
@@ -5,6 +5,21 @@ 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.2] - 2026-10-11
9
+
10
+ ### Changed
11
+
12
+ - README shows the Test workflow and npm version badges under the title, like every other Nera package.
13
+
14
+ ## [1.0.1] - 2026-10-09
15
+
16
+ ### Fixed
17
+
18
+ - README: a missing `alt` is reported by `nera check` (output rule
19
+ `a11y-img-alt`), not by `nera validate`; the CI cache snippet uses
20
+ `actions/cache@v6`; the `og:image` snippet says that `app.origin` comes
21
+ from the `origin` key in `config/app.yaml`
22
+
8
23
  ## [1.0.0] - 2026-10-09
9
24
 
10
25
  ### Added
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # @nera-static/plugin-images
2
2
 
3
+ [![Test](https://github.com/seebaermichi/nera-plugin-images/actions/workflows/test.yml/badge.svg)](https://github.com/seebaermichi/nera-plugin-images/actions/workflows/test.yml)
4
+ [![npm version](https://img.shields.io/npm/v/@nera-static/plugin-images)](https://www.npmjs.com/package/@nera-static/plugin-images)
5
+
3
6
  A plugin for the [Nera](https://github.com/seebaermichi/nera) static site generator that turns every local image in your Markdown into responsive, modern-format markup at build time: `<picture>` with AVIF/WebP, `srcset`/`sizes`, `width`/`height`, lazy loading, and camera metadata (EXIF/GPS) stripped.
4
7
 
5
8
  📖 **Documentation:** [nera.js.org](https://nera.js.org)
@@ -52,7 +55,7 @@ Without the plugin, this is a bare `<img src="/images/blog/2026/zerpensafari-iph
52
55
  </picture>
53
56
  ```
54
57
 
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 validate`](https://nera.js.org) reports it, the plugin does not invent one.
58
+ 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
59
 
57
60
  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
61
 
@@ -181,7 +184,7 @@ Options: `alt`, `class`, `sizes` (for a column layout, e.g. `'(min-width: 60em)
181
184
 
182
185
  ### `og:image`
183
186
 
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:
187
+ 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
188
 
186
189
  ```pug
187
190
  if meta.images && meta.images.image && meta.images.image.og
@@ -222,7 +225,7 @@ A cold build of a site with ~100 images takes a minute or more, because AVIF enc
222
225
 
223
226
  ```yaml
224
227
  # GitHub Actions, before `npm run build`
225
- - uses: actions/cache@v4
228
+ - uses: actions/cache@v6
226
229
  with:
227
230
  path: .nera-cache
228
231
  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.0",
3
+ "version": "1.0.2",
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": {