Skip to content
/ mozify Public

Way how to show images in email templates even if they are blocked

License

Notifications You must be signed in to change notification settings

karster/mozify

Repository files navigation

Mozify

Build Status Latest Stable Version GitHub license

Email client blocks images by default. Mozify is way how to serve images to your customers.

Installation

The preferred way to install this extension is through composer.

Either run

composer require karster/mozify:"*"

or add

"karster/mozify": "*"

to the require section of your composer.json.

Usage

use karster\image\Mozify;

$mozify = new Mozify();
$result = $mozify->setImageSrc('path/to/image.jpg')
        ->setSearchWindow(10)
        ->setColorDepth(8)
        ->setTest(true)
        ->generate();

echo $result;

To change image dimensions set width or height. Second attribute will calculate from image ratio.

use karster\image\Mozify;

$mozify = new Mozify();
$result = $mozify->setImageSrc('path/to/image.jpg')
        ->setSearchWindow(10)
        ->setColorDepth(8)
        ->setWidth(500)
        //->setHeight(300)
        ->generate();

echo $result;

Safari

Coffee

Tests

./vendor/bin/phpunit -c phpunit.xml

Contribution

Have an idea? Found a bug? See how to contribute.

License

MIT see LICENSE for the full license text.

About

Way how to show images in email templates even if they are blocked

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages