league/glide
Glide is an on-demand PHP image manipulation library served over HTTP. Resize, crop, and apply effects with simple URL parameters, with automatic caching and far-future headers. Works with GD, Imagick, or libvips and Flysystem storage.
markAdds a watermark to the image. Must be a path to an image in the watermarks file system, as configured in your server.
<img src="kayaks.jpg?mark=logo.png">

Configuring the watermarks file system is exactly the same as configuring the source and cache file systems. See the source & cache for more information about setting up file systems.
<?php
$server = ServerFactory::create([
'watermarks' => new Filesystem(new Local('path/to/watermarks/folder')),
'watermarks_path_prefix' => 'images/watermarks', // optional
]);
markwSets the width of the watermark in pixels, or using relative dimensions.
<img src="kayaks.jpg?mark=logo.png&markw=200">
markhSets the height of the watermark in pixels, or using relative dimensions.
<img src="kayaks.jpg?mark=logo.png&markh=200">
markfitSets how the watermark is fitted to its target dimensions.
contain: Default. Resizes the image to fit within the width and height boundaries without cropping, distorting or altering the aspect ratio.max: Resizes the image to fit within the width and height boundaries without cropping, distorting or altering the aspect ratio, and will also not increase the size of the image if it is smaller than the output size.fill: Resizes the image to fit within the width and height boundaries without cropping or distorting the image, and the remaining space is filled with the background color. The resulting image will match the constraining dimensions.stretch: Stretches the image to fit the constraining dimensions exactly. The resulting image will fill the dimensions, and will not maintain the aspect ratio of the input image.crop: Resizes the image to fill the width and height boundaries and crops any excess image data. The resulting image will match the width and height constraints without distorting the image. See the crop page for more information.<img src="kayaks.jpg?mark=logo.png&markw=200&markh=200&markfit=crop">
markxSets how far the watermark is away from the left and right edges of the image. Set in pixels, or using relative dimensions. Ignored if markpos is set to center.
<img src="kayaks.jpg?mark=logo.png&markw=200&markx=20">
markySets how far the watermark is away from the top and bottom edges of the image. Set in pixels, or using relative dimensions. Ignored if markpos is set to center.
<img src="kayaks.jpg?mark=logo.png&markw=200&marky=20">
markpadSets how far the watermark is away from edges of the image. Basically a shortcut for using both markx and marky. Set in pixels, or using relative dimensions. Ignored if markpos is set to center.
<img src="kayaks.jpg?mark=logo.png&markw=200&markpad=20">
markposSets where the watermark is positioned. Accepts top-left, top, top-right, left, center, right, bottom-left, bottom, bottom-right. Default is center.
<img src="kayaks.jpg?mark=logo.png&markpos=top-left">

markalphaSets the opacity of the watermark. Use values between 0 and 100, where 100 is fully opaque, and 0 is fully transparent. The default value is 100.
<img src="kayaks.jpg?mark=logo.png&markalpha=50">

How can I help you explore Laravel packages today?