Vue Email Logo
Components

Image

Display an image in your email.

Install

Install component from your command line.

pnpm add @vue-email/components
# or get the individual package
pnpm add @vue-email/img

Getting started

Add the component to your email template. Include styles where needed.

<script setup lang="ts">
import { Img } from '@vue-email/components'
</script>

<template>
  <Img src="cat.jpg" alt="Cat" width="300" height="300" />
</template>
All email clients can display .png, .gif, and .jpg images. Unfortunately, .svg images are not well supported, regardless of how they’re referenced, so avoid using these. See Can I Email for more information.
alt
string

Alternate description for an image

src
string

The path to the image

width
string

The width of an image in pixels

height
string

The height of an image in pixels


Copyright © 2024