Home / Snippets / Laravel Intervention Image Change Driver
Laravel Intervention Image Change Driver cover

Laravel Intervention Image Change Driver


2 years ago


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".

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

notion avatar

Ahmad Aziz

Week-end developer currently experimenting with web, mobile, and all things programming.






Support Us

If you like our tutorial, support us by being our Patreon or buy us some coffee ☕️

Post Tutorials

Learn trending tutorials for ReactJs, React Native, VueJS, NextJs, Laravel, Tailwind CSS, and Flutter development.
View Tutorials

Code Components

Collection of Tailwind CSS components for everyone to use. Browse all of the components that's right for your web projects
View Components

Welcome to PostSrc V3

PostSrc Dark Logo

You have to login to favorite this