Image scaling and allowed sizes Last updated: 07. Jul 2026
How image scaling URLs work and how to control which sizes are allowed via Images.SizePolicy in site.json.
Image URL: /path/photo.jpg/WxHxM/seo-name.jpg. Without any restriction the site accepts any size (each unique size costs CPU plus its own cache entry). The Images.SizePolicy key in site.json controls how sizes are enforced.
The WxHxM key: W = width in px (0 = free), H = height in px (0 = free), M = scaling mode (0 = ScaleToFit default, 1 = ScaleToFill, …). "1200x800" is treated as mode 0.
Mode | Behaviour |
|---|---|
| Any size. Only |
| Accepts |
| An unknown size returns HTTP 400. No self-expansion. |
Admin (the 'Image sizes' tab in folder properties): choose policy/cap, review the approved and discovered lists ('Promote'), and run 'Scan pages now' for a preview (add / remove / keep) before writing. If site.json is missing, it is created on save.
Shared per folder: several templates and aliases share the same site.json — the policy is managed in one place and 'Scan' covers all the templates. URLs generated by client-side JavaScript are not discovered and must be added to AllowedSizes manually.
Not subject to SizePolicy: scaleImage and attachFile64 run server-side and are controlled by your own code — only the WxHxM URL is enforced. To pick an output format, see Image output formats (WebP / AVIF).