Email client blocks images by default. Mozify is way how to serve images to your customers.
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.
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;
./vendor/bin/phpunit -c phpunit.xml
Have an idea? Found a bug? See how to contribute.
MIT see LICENSE for the full license text.