🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

mjml-image

Package Overview
Dependencies
Maintainers
7
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjml-image

mjml-image

latest
Source
npmnpm
Version
5.1.0
Version published
Weekly downloads
1.1M
-13.25%
Maintainers
7
Weekly downloads
 
Created
Source

mj-image

Displays a responsive image in your email. It is similar to the HTML <img /> tag.

Note that if no width is provided, the image will use the parent column width.

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-image width="300px" src="https://static.mailjet.com/mjml-website/documentation/image.png" />
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Attributes

attributeacceptsdescriptiondefault value
alignleft center rightimage alignmentcenter
altstringimage description''
borderstringCSS border format0
border-bottomstringCSS border format
border-leftstringCSS border format
border-radiusstringborder radius
border-rightstringCSS border format
border-topstringCSS border format
container-background-colorCSS color formatsinner element background color
css-classstringclass name, added to the root HTML element created
fluid-on-mobilebooleanif true, will be full width on mobile even if width is set
font-sizepxsize of the alt text when image is not rendered13px
heightpximage heightauto
hrefstringlink to redirect to on click, in URL format
max-heightpx %specify the maximum height of an image
namestringspecify the link name attribute
paddingpx %hero padding, supports up to 4 parameters10px 25px
padding-bottompx %hero bottom padding
padding-leftpx %hero left padding
padding-rightpx %hero right padding
padding-toppx %hero top padding
relstringspecify the rel attribute
sizesstringset width based on query
srcstringimage source in URL format
srcsetstringenables to set a different image source based on the viewport, using CSS syntax
targetstringlink target on click_blank
titlestringtooltip & accessibility
usemapstringreference to image map, be careful, it isn't supported everywhere
widthpximage widthinherits parent width

Try it live

FAQs

Package last updated on 24 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts