Activating legacy or experimental behaviour

Last modified: March 27th, 2024

Working with a specific static site generator?
Customize CloudCannon's documentation to suit your SSG.

Great! We'll show you documentation relevant to .
You can change this any time using the dropdown in the navigation bar.

Flags are options that can change CloudCannon's default behaviour. This might mean opting into a feature that is still in development, or reverting to legacy behaviour.

You can turn flags on/off in your Danger Zone / Flags section of your Site Settings. These settings are in the Danger Zone because they all represent options that are not the default (recommended) behaviour on CloudCannon.

This article will explain the context behind each flag, and describe what it would mean to toggle them on/off.

Image size attributes default behaviour#

image_size_attributes is a configuration option that can be set for the Content Editor and Editable Regions, using the configuration cascade. When image_size_attributes is true, CloudCannon will inject width and height attributes onto images that are added to rich text through the editor.

See this article for more information about why you might want CloudCannon to add these attributes to your images. One noteable disadvantage of this behaviour is that, depending on the Markdown engine used by your site, Markdown-formatted images may need to be converted to HTML.

This flag sets the default behaviour, when image_size_attributes is not explicitly configured. If this flag is turned on, any image input that does not explicitly have image_size_attributes configured will inject the attributes. In most cases, this flag will be turned off, meaning that the attributes will not be injected for any editing interface that does not have image_size_attributes: true.

If you are considering turning this flag on, we would recommend using the image_size_attributes in your configuration instead. This flag will be turned on for some sites to maintain the legacy behaviour where these attributes were always added to rich text images by default.

Legacy Collections Value Key#

When you use a select input to reference a collection item, the value saved in your front matter is determined by options.value_key configured for your input. If this option has not been configured, the value will fallback to look for one of several sensible keys to pull from, like "id" and "title".

This flag exists to provide legacy behaviour to sites created before 25 November 2021. If turned on, select inputs that reference collection items, and which do not have options.value_key configured, will save a combination of the collection item's path, slug and id.

It is not recommended to turn this flag on. Instead, configure options.value_key for any select inputs that reference collections on your site.

Open in a new tab