PHPackages                             puz/mail\_autoembed - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. puz/mail\_autoembed

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

puz/mail\_autoembed
===================

Automatically embed all image sources in your emails

0.1.0(9y ago)14221MITPHP

Since Jun 8Pushed 9y ago2 watchersCompare

[ Source](https://github.com/molteber/puz-autoembed)[ Packagist](https://packagist.org/packages/puz/mail_autoembed)[ RSS](/packages/puz-mail-autoembed/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Puz - Auto embed for images [![Build Status](https://camo.githubusercontent.com/f237cc842676d92714fb34e04a142d0d97ad9de8a4e791fdb108bb765a0682b2/68747470733a2f2f7472617669732d63692e6f72672f6d6f6c74656265722f70757a2d6175746f656d6265642e7376673f6272616e63683d6d6173746572)](https://github.com/molteber/puz-autoembed)
==========================================================================================================================================================================================================================================================================================================================

[](#puz---auto-embed-for-images-)

*This package is mainly made for Laravel 5.2, but is fully useful for every application which uses [Swift Mailer](https://packagist.org/packages/swiftmailer/swiftmailer)*

To install: `composer require puz/mail_autoembed`

To use without laravel:

```
$mailer = new \Swift_Mailer;
$mailer->registerPlugin(new \Puz\Mail\AutoEmbed\ImagesToAttachments);
```

To use with laravel ^5.2:

```
// Add the service provider in the list of your service providers in app.php. It MUST be added after laravels mail service provider
$providers[
    ...
    \Puz\Mail\AutoEmbed\AutoEmbedServiceProvider::class,
    ...
 ];
```

This package will register two plugins to the mailer.

- beforeSendPerformed
    - Right before the email is sent, it will scan the email for ![]() tags and it's src attribute. It will accept data:image, local image path and remote image
- sendPerformed
    - Right after the mailer have sent the email away, it will go ahead and delete the temporary created images (for remote and data:image).

Contributions
=============

[](#contributions)

Any suggestion or code improvement will be gladly accepted.

Future features
===============

[](#future-features)

- Save all the images which is attached. This can be useful in situations where the user send the email from a text editor and you need to display the email on your website as well. Good thing you saved the image right?!

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3627d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d2660f1a490c9540df6cf129e8dd1be0704c28192e91970776ec4734642a8fba?d=identicon)[Molteber](/maintainers/Molteber)

---

Top Contributors

[![molteber](https://avatars.githubusercontent.com/u/8125386?v=4)](https://github.com/molteber "molteber (8 commits)")[![ircop](https://avatars.githubusercontent.com/u/2287048?v=4)](https://github.com/ircop "ircop (1 commits)")

---

Tags

laravelimagemailemailembedattach

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/puz-mail-autoembed/health.svg)

```
[![Health](https://phpackages.com/badges/puz-mail-autoembed/health.svg)](https://phpackages.com/packages/puz-mail-autoembed)
```

###  Alternatives

[propaganistas/laravel-disposable-email

Disposable email validator

5762.6M6](/packages/propaganistas-laravel-disposable-email)[coconutcraig/laravel-postmark

Laravel package for sending mail via the Postmark API

2152.9M1](/packages/coconutcraig-laravel-postmark)[rulr/laravel-mailpot

A local mail inbox for Laravel

161.9k](/packages/rulr-laravel-mailpot)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
