LiSA Social Commerce
Developers
Developers
  • Developers
  • Guides
    • Integration Guide
      • Web Integration
      • App Integration
        • Android
          • Communication
          • Storage
          • File Downloads
          • Theming
        • iOS
          • Communication
          • Storage
          • File Downloads
          • Theming
        • React Native
          • Communication
          • Storage
          • File Downloads
          • Theming
        • Picture in Picture
      • Entrypoints
        • Query Parameter (v1)
    • Player Communication
      • Message API Reference
        • App
          • App — Heartbeat
          • App — Message Acknowledge
          • App — Message Error
          • App — Listen
        • CTA
          • CTA — Link in Comments
          • CTA — Sponsor Badge
        • Cart — View Cart
        • Comments — Join
        • Media
          • Media — Complete
          • Media — Pause
          • Media — Progress
          • Media — Resume
        • Media Item
          • Media Item — Emoji
          • Media Item — Impression
        • Player
          • Player — Dismiss
          • Player — Native Picture-in-Picture (PiP)
          • Player — Pass Visual Viewport
          • Player — Request Visual Viewport
          • Player — UI Transition
        • Products
          • Products — Add to Cart
          • Products — Add to Wishlist
          • Products — Click
          • Products — Close Product List
          • Products — Emoji
          • Products — Emoji State Update
          • Products — Impression
          • Products — Open Product List
        • Stickers
          • Stickers — Activate
          • Stickers — Click
          • Stickers — Expire
          • Stickers — Impression
          • Stickers — Publish
          • Stickers — Unlock
          • Stickers — Unpublish
          • Stickers — Update
          • Stickers — Voucher Claim
        • Visitor — Pass User Context
        • Shared Legacy Message Properties
    • Products
      • Product Update Notification API
  • Widgets
    • Content Hub
    • Quick Start Guide
    • Appearance
      • Markup
      • Responsive design
    • Configuration options
      • Autoplay
      • Channel
      • Client
      • Data
      • Debug
      • Host node
      • Layout
      • Language
      • On
      • Player
      • Query string
      • Quick view
      • Sections
      • Store
      • Template
    • API reference
      • Library API reference
      • Player API reference
      • Quick View API reference
    • Customisations
      • Template
      • Bring your own template
      • Type definitions
    • Examples
    • Type definitions
      • Asset
      • Product
      • Other
    • Promo Widget
      • Quick Start Guide
      • Configuration options
        • Autoplay
        • Channel
        • Countdown (deprecated)
        • Enabled
        • Image modifier
        • Lead time
        • Live (deprecated)
        • Position
        • Replay (deprecated)
        • Show ID
        • URL
  • Media Player Introduction
    • Picture-in-Picture Mode
  • Analytics
  • REST API
    • Authentication
    • Rate limits
    • Response status and error codes
    • API Documentation
Powered by GitBook
On this page
  • Image fit
  • Examples
  1. Widgets
  2. Promo Widget
  3. Configuration options

Image modifier

The optional imageModifier flag allows you to scale/crop the Promo Widget image.

const alertConfig: Partial<AlertConfig> = {
  imageModifier: 'x512',
};

You can set the modifier to scale the image to a fixed width and height or to a fixed width or heigh, while preserving the original images aspect ratio.

Width and height values can be any numeric value between 1 and 9999. Values above 9999 are currently not supported.

Image fit

When both a width and height are provided, the possible methods by which the image should fit these are:

200x200c — Preserving aspect ratio, contain within both provided dimensions using "letterboxing" where necessary.

200x200f — Ignore the aspect ratio of the input and stretch to both provided dimensions.

200x200i — Preserving aspect ratio, resizing the image to be as large as possible while ensuring its dimensions are less than or equal to both those specified.

200x200o — Preserving aspect ratio, resize the image to be as small as possible while ensuring its dimensions are greater than or equal to both those specified.

If omitted, the default fit cover is applied, preserving aspect ratio, ensuring the image covers both provided dimensions by cropping/clipping to fit.

Examples

480x854 — Fixed width (480px) and height (480px). Original image's aspect ratio ignored.

480x854c — Fixed width (480px) and height (480px). Preserving aspect ratio, contain within both provided dimensions using "letterboxing" where necessary.

480x — Fixed width (480px) while preserving the original image's aspect ratio.

x854 — Fixed height (854px) while preserving the original image's aspect ratio.

PreviousEnabledNextLead time

Last updated 1 year ago