1.18.0 performance items: tests, the reference budget gate tightened (JS 195 kB, 404 without its exception, TTL check), docs (performance.md, AGENT.md, iapl-performance, module pages, api.md), changelog: what changes for an existing site

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-12-01 15:54:15 +01:00
co-authored by Claude Opus 5.5
parent d628839235
commit f0127ac1b8
35 changed files with 1154 additions and 288 deletions
+15
View File
@@ -50,6 +50,21 @@ export const Media: CollectionConfig = {
}
```
**Metadata (1.18.0).** Every JPEG and PNG upload that passes the limits loses its metadata — camera, date, GPS
position, comments — without re-encoding: `stripImageMetadata` drops the JPEG APP1 (EXIF, XMP), APP13 (IPTC) and
comment segments and the PNG text, eXIf and tIME chunks; the pixels and the colour profile stay byte for byte. A photo
whose EXIF says "rotate" is turned once (sharp, JPEG quality 92) so it does not show sideways. Only new uploads; no
stored variants are added. Off: `buildOptimizeUploadHook({ stripMetadata: false })`. Building blocks:
`stripImageMetadata(buffer, mimeType)` → `{ buffer, changed, orientation }`, `exifOrientation(app1)`.
**Unused media in the panel (1.18.0, opt-in).** `iapl({ unusedMedia: true })` (or `{ collections: ['media'] }`) puts a
notice above the list of each upload collection: how many files no page, entry or setting uses — by id (relations,
uploads in rich text and blocks, drafts and every language) or by file name inside a text — with a link that opens
Payload's own list filtered to them. The editor checks them and deletes them there (bulk delete, with its confirmation
and access rules); nothing is deleted by itself. Editors and admins see it; on a site with more than 5000 documents it
shows only a hint to run `iapl-doctor --deep` (`growth-media`). After turning it on: `pnpm generate:importmap`
(`@intecion/ipal-kit/admin#UnusedMediaNotice`).
`buildOptimizeUploadHook` and `buildMediaPlaceholderHook` use the `sharp` passed to
`buildConfig({ sharp })` — the plugin does not import it. Postgres with migrations: new fields →
`pnpm payload migrate:create`.