Skip to main content

Image

Image from a promotion

Overview

Image

The image will render different images based on the parent container the element is placed in. Each promotion from the BAM api is served with a variety of images, all with different sizes. The component will compare the aspect ratio of container and compare it to the included images and choose the image that fits the closest. The image is optimally served with a srcSet, so the full size will not be requested at smaller screen sizes. If multiple promotions are returned, the image will rotate through promotions by default. Pass the prop rotate="false" to prevent this behavior.

Possible Image Sizes

Image TypeIDWidthHeightAspect Ratio
Ad Server53031541.97:1
Mobile Banner710004002.5:1
App Game Page Ad8375507.5:1
Pro Tab Slim Ad38375509.375: 1
Desktop banner6320028013.4:1
GAM_mobile_banner104320506.4
// custom defined tag
<bam-image
property-id="1"
placement-id="1"
context="context">
</bam-image>
SSR AvailableThis component is available for server side rendering.

Properties

PropertyAttributeDescriptionTypeDefault
contextcontextstringundefined
ctaTypecta-typestringundefined
deferdeferbooleanundefined
devModedev-modebooleanfalse
deviceTypedevice-type"android" | "desktop" | "ios" | "mobile"undefined
gameIdgame-idnumberundefined
isBetsyncUseris-betsync-userbooleanundefined
isMobileis-mobilebooleanundefined
leagueleaguestringundefined
locationlocationstringundefined
pageSlugpage-slugstringundefined
placementIdplacement-idnumberundefined
propertyIdproperty-idnumberundefined
rotaterotatebooleantrue
rotateTimerotate-timenumberDEFAULT_ROTATE_TIME
subdivisionsubdivisionnumberundefined
subscriptionTiersubscription-tier0 | 1 | 2 | 3undefined
timeLimittime-limitnumber0
typetypeThis can tell the component to try to render a specific type image.stringnull
wasProwas-probooleanundefined