karster / mozify
Installs: 1 604
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 1
Open Issues: 0
Requires
- php: >=7.0
Requires (Dev)
- phpunit/phpunit: ^5.7
- symfony/var-dumper: *
This package is auto-updated.
Last update: 2024-11-16 13:36:14 UTC
README
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;
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.