cloudinary-laravel icon indicating copy to clipboard operation
cloudinary-laravel copied to clipboard

Add overlay image

Open chriship opened this issue 3 years ago • 4 comments

Hi,

Is it possible to add a watermark/overaly image to another image or video using this package?

chriship avatar May 31 '21 20:05 chriship

Try this:


$imageUrl = cloudinary()->upload($file->getRealPath(), [
                                        'folder' => 'images',
                                        'transformation' =>[
                                            ["width" => 1000, "height" => 1000, "crop" => "limit"],
                                            ["overlay" => "public-id", "flags" => "relative", "width" => 0.5]
                                        ] ,
                                        
                            ])->getSecurePath();

Replace public-id with the actual public id of the watermark image

papa28x4 avatar Jun 03 '21 10:06 papa28x4

Thanks, is it possible to use a url for the watemark image?

chriship avatar Jun 03 '21 10:06 chriship

I don't know if it's possible. I have tried using it and it didn't work.

papa28x4 avatar Jun 03 '21 10:06 papa28x4

@chriship do you mean a URL that's not on Cloudinary?

unicodeveloper avatar Jun 02 '22 12:06 unicodeveloper

@chriship this should help/work https://cloudinary.com/documentation/layers#remote_image_overlays

unicodeveloper avatar Oct 02 '23 06:10 unicodeveloper