Posts Learn Components Snippets Categories Tags About
/

Laravel Intervention Image Change Driver

Learn how to change driver in Laravel Intervention Image by updating the configuration file

Created on Sep 15, 2021

5 views

In this short snippet, you will learn how to change the driver used by Laravel Intervention Image to either use "gd" or "imagick". Let's get started.

Step 1: Install Intervention Image


If you have not installed the Laravel Intervention Image package do run the command below.
composer require intervention/image

Step 2: Publish Intervention Image Configuration


Now that you have it installed it's time to publish the configuration like below.
php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravelRecent"

Laravel Intervention Driver Option


The driver for Laravel Intervention can be updated as follows. Do note that the location for the configuration is in "config/image.php".
<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Image Driver
    |--------------------------------------------------------------------------
    |
    | Intervention Image supports "GD Library" and "Imagick" to process images
    | internally. You may choose one of them according to your PHP
    | configuration. By default PHP's "GD Library" implementation is used.
    |
    | Supported: "gd", "imagick"
    |
    */

    'driver' => 'gd'

];
The only value that you can specify for the driver is "gd" which is by default and "imagick". Do note that you need to have Imagick Installed on the machine in order to use the driver.

Other Reads

Snippets by

PostSrc poster

PostSrc

Full stack developer mainly focusing on the front end side of the web. The main author of PostSrc and loves writing tutorial and guides online.

Load comments for Laravel Intervention Image Change Driver

new

PostSrc Code Components

Collection of Tailwind CSS components for everyone to use. Browse all of the components that's right for your project.

View Components

Other Code Snippets

More