cloudinary-community / cloudinary-laravel

Laravel SDK for Cloudinary
MIT License
259 stars 70 forks source link

Add overlay image #36

Closed chriship closed 8 months ago

chriship commented 3 years ago

Hi,

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

papa28x4 commented 3 years ago

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

chriship commented 3 years ago

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

papa28x4 commented 3 years ago

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

unicodeveloper commented 2 years ago

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

unicodeveloper commented 8 months ago

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