Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mjml-image

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjml-image

mjml-image

  • 2.0.10
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is mjml-image?

The mjml-image npm package is a component of the MJML framework, which is used to create responsive email templates. The mjml-image component specifically allows you to add and customize images within your email templates.

What are mjml-image's main functionalities?

Basic Image Insertion

This feature allows you to insert a basic image into your email template. The 'src' attribute specifies the URL of the image.

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-image src="https://via.placeholder.com/150" />
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Image with Alt Text

This feature allows you to add alt text to your image, which is useful for accessibility and for cases where the image cannot be displayed.

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-image src="https://via.placeholder.com/150" alt="Placeholder Image" />
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Image with Link

This feature allows you to make your image clickable by wrapping it in a link. The 'href' attribute specifies the URL to which the image will link.

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-image src="https://via.placeholder.com/150" href="https://example.com" />
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Image with Custom Width

This feature allows you to set a custom width for your image. The 'width' attribute specifies the width of the image in pixels.

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-image src="https://via.placeholder.com/150" width="300px" />
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Image with Padding

This feature allows you to add padding around your image. The 'padding' attribute specifies the amount of padding in pixels.

<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-image src="https://via.placeholder.com/150" padding="20px" />
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Other packages similar to mjml-image

FAQs

Package last updated on 31 Aug 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc