Skip to content

Image

wiz-image is a cross-channel image component for displaying images in emails and e-Detailers. It supports responsive layouts, clickable image links, and automatic image sizing with fallback to default placeholder images.

The wiz-image component includes responsive behavior for mobile devices (screens up to 480px width), ensuring images remain properly sized and accessible on smaller screens.

The cross-channel image component has the following key features:

  • Responsive layout with auto-fit capabilities.

  • Clickable image links with URL navigation.

  • Image sizing and alignment control.

  • Accessibility support through alt text.

  • Email table rendering for optimal client compatibility.

  • Marketing automation link tracking.

Installation

The wiz-image component is part of the eWizard.js component library. To install it to your project, run the following command in the terminal:

wiz install @component/wiz-image

Then, import the component in your Vue file:

javascript
import wizImage from '@component/wiz-image';

export default {
  components: {
    wizImage
  }
}

Register the component globally in your application or import it in your Vue template.

Properties

The wiz-image component has the following properties:

PropertyTypeDefaultDescription
srcString'./media/images/default-image.jpg'The image source URL or path.
altString'Image'Alternative text for the image for accessibility.
widthNumber0Image width in pixels (0 = auto).
heightNumber0Image height in pixels (0 = auto).
alignString'center'Image alignment: 'center', 'left', or 'right'.
linkString''URL to navigate to when the image is clicked.
dataMsysLinknameString''Data attribute for marketing automation link tracking.
autoFitWidthBooleantrueAutomatically fit image width to container (non-email channels).
autoFitHeightBooleantrueAutomatically fit image height to container (non-email channels).
draggableBooleanfalseAllow the image to be dragged on the content item layout in eWizard Editor.
componentNameString'Image'Internal component name identifier.

Custom events

The wiz-image component doesn't emit any custom events. The component handles click interactions through the optional link property, which navigates to the specified URL when the image is clicked.

Channel-specific behavior

The cross-channel image component adapts its rendering and functionality based on the content item context.

  • Images are rendered as standard HTML <div> elements.

  • Supports object-fit CSS for image scaling.

  • Respects the autoFitWidth and autoFitHeight properties for flexible layout.

Basic usage example

html
<wiz-image
  :width="200"
  :height="200"
  align="center"
  src="image.png"
  alt="image alt"
></wiz-image>