Skip to content

Image Field

The same as File, narrowed to pictures — and the form shows a preview instead of a file name.

Settings: source and file path, as for a file, plus control over the saved name:

SettingWhat it does
Filename strategyKeep the original, transliterate it, generate a random one, use the date, or build it from a pattern
Filename prefixPrepended to the result
Filename patternThe template, when the strategy is "pattern"

Output:

html
<img src="/{$image.url}"
     width="{$image.width}"
     height="{$image.height}"
     alt="{$image.title}">

Transliteration is worth turning on

An uploaded file keeps its original name by default, and originals arrive named in the editor's language, with spaces and brackets. Such a name survives on disk but complicates everything downstream — links, caches, CDNs. Transliteration costs one setting.

© PageBlocks 2019-present