Markdown image sizes
Offer named image widths in the Story editor and use them in your website’s layout.
Use studio.images.json beside package.json to give writers named sizes in the Story editor. Without named sizes, editors can still use Default and Custom width.
{
"sizes": [
{ "value": "compact", "label": "Compact" },
{ "value": "full-column", "label": "Full article column" }
]
}
| Setting | Values and effect |
|---|---|
sizes | Array of choices in display order. An absent or empty list adds no named sizes. |
sizes[].value | Stable identifier written into Markdown, for example {size="full-column"}. Start with a lowercase letter, then use lowercase letters, digits, or hyphens. For duplicate identifiers, Studio uses the first valid choice. |
sizes[].label | Required, nonempty picker label. The identifiers compact, normal, and wide use Studio’s standard labels. Custom identifiers use your label. |
A custom width is saved as {width="320px"} or {width="75%"}. A named size replaces an explicit width. Alignment is independent and uses align="left", "center", or "right". Have the site renderer read the image attributes and apply the corresponding layout.