All available configuration options with their defaults.
Width and height of the generated image.
WAGTAIL_OG_GENERATOR_IMAGE_WIDTH = 1200 WAGTAIL_OG_GENERATOR_IMAGE_HEIGHT = 630
Controls the amount of padding of the image.
WAGTAIL_OG_GENERATOR_IMAGE_PADDING = 32
Name of the collection that the generated images will get sorted into. Will be created if it doesn't exist yet.
WAGTAIL_OG_GENERATOR_COLLECTION_NAME = 'OpenGraph'
Name of the tab within the page edit/create views.
WAGTAIL_OG_GENERATOR_TAB_NAME = 'Open Graph image'
Path to your custom Page model, if any. Only matching object instances will be considered by the addon for image creation.
WAGTAIL_OG_GENERATOR_PAGE_MODEL = 'wagtailcore.Page'
Automatic image creation¶
True an image will be automatically created and saved when matching objects, defined by
WAGTAIL_OG_GENERATOR_PAGE_MODEL are saved.
WAGTAIL_OG_GENERATOR_CREATE_AUTOMATICALLY = True
If your page model includes additional fields, you can use the following settings to make these fields accessible by the generator. For example, if your page has a field for a background image, this image can also be used as a background image for the Open Graph image.
LOGO field expects a SVG file, so basically a foreign key to a
wagtaildocs.Document with valid SVG data.
WAGTAIL_OG_GENERATOR_FIELD_SUBTITLE = '' WAGTAIL_OG_GENERATOR_FIELD_BACKGROUND_IMAGE = '' WAGTAIL_OG_GENERATOR_FIELD_LOGO = ''