ImageFieldType
¶
Source code in docs_src/capo_partnercentral_marketing/types/image_field_type.py
allowed_formats
instance-attribute
¶
allowed_formats: NotRequired[ImageFormatList]
Accepted image formats.
default_value
instance-attribute
¶
default_value: NotRequired[LayoutPreview]
The AWS-authored image the asset uses until the partner sets one: shown in previews and published in an empty slot of an email, landing page, banner ad or social post. It fills a required image field. A document leaves an empty image slot blank.
max_size_bytes
instance-attribute
¶
max_size_bytes: NotRequired[int]
Maximum accepted file size in bytes.
recommended_height_pixels
instance-attribute
¶
recommended_height_pixels: NotRequired[int]
The image height, in pixels, that fills this slot. Present exactly when RecommendedWidthPixels is.
recommended_width_pixels
instance-attribute
¶
recommended_width_pixels: NotRequired[int]
The image size, in pixels, that fills this slot and prints sharply, for example 1920 x 301 for a full-width header. Shown to the partner as "Recommended: W x H px". Present, together with RecommendedHeightPixels, on document (PDF) image slots only, where the slot is a fixed rectangle. Such a slot is always filled: the image is scaled to cover it, centred, and clipped to it, the same as CSS object-fit: cover. An image whose shape is too far from W:H is refused with IMAGE_ASPECT_RATIO_MISMATCH; one narrower than W is accepted. A slot showing the partner's logo or badge, and a slot without the two members (every slot from before sizes existed), fits the image inside instead (object-fit: contain): a logo or a badge is never cropped. Email and landing-page image slots are laid out by HTML and carry neither.