Laravel wrapper for

0.3 2020-03-20 11:11 UTC

This package is auto-updated.

Last update: 2020-09-20 12:16:24 UTC


This package is a laravel wrapper for despark/image-purify


Get it from composer

composer require despark/laravel-image-purify

With Laravel 5.5 or newer, the package will be discovered automatically. If you're using an older version of Laravel, add the following to your config/app.php file:

$providers = [

If you want an instance of the purifier you can dependency inject Despark\ImagePurify\Interfaces\ImagePurifierInterface

If instead you want to register a facade add this to you config/app.php

$aliases = [
    'ImagePurify' => \Despark\Laravel\ImagePurify\Facades\ImagePurify::class

If you need custom options you can publish the config via

php artisan vendor:publish --provider "Despark\Laravel\ImagePurify\ImagePurifyServiceProvider" --tag config

Example Usage

use Despark\ImagePurify\Interfaces\ImagePurifierInterface;

class HomeController extends Controller{
    public function optimize(ImagePurifierInterface $purifier){

For additional options and usage see despark/image-purify documentation.