Image | UI components (BETA)

APPLICABLE PRODUCTS
  • Sales Hub
    • Enterprise
  • Service Hub
    • Enterprise

The Image component renders an image. Use this component to add a logo or other visual brand identity asset, or to accentuate other content in the extension.

Images cannot exceed the width of the extension's container at various screen sizes, and values beyond that maximum width will not be applied to the image.

ui-extension-image-component
import { Image } from '@hubspot/ui-extensions'; const Extension = () => { return ( <Image alt="A picture of a welcome sign" src="https://picsum.photos/id/237/200/300" href="https://picsum.photos/id/237" onClick={() => { console.log('Someone clicked the image!'); }} width={200} /> ); };
Prop Type Description
src  Required  String The URL of the image to display.
alt  String The alt text for the image, similar to the alt attribute for the HTML img tag.
href  String When provided, the URL that will open when the image is clicked.
onClick  Function A function that will be called when the image is clicked. This function will receive no arguments and any returned values will be ignored.
width Number The pixel width of the image.
height Number The pixel height of the image.

Was this article helpful?
This form is used for documentation feedback only. Learn how to get help with HubSpot.