Raviya Technical
Published in

Raviya Technical

Laravel with Packages | Add Watermark on Images in Laravel

Install intervention/image Package

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

Add Watermark to image

Route::get('addWatermark', function(){$img = Image::make(public_path('images/main.png'));/* insert watermark at bottom-right corner with 10px offset */$img->insert(public_path('images/logo.png'), 'bottom-right', 10, 10);$img->save(public_path('images/main-new.png'));dd('saved image successfully.');});



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