How to add watermark on an image in Laravel 5.8 Step by Step

Step:1 Install intervention/image Package

composer require intervention/image
‘providers’ => [
Intervention\Image\ImageServiceProvider::class
]
‘aliases’ => [
‘Image’ => Intervention\Image\Facades\Image::class
]

Step:2 Add Watermark to image

public function addWatermark(){
$img = Image::make(public_path('images/main.png'));
$img->insert(public_path('watermark.png'),'bottom-right',10, 10);
$img->save();
}

--

--

Software Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store