Thumbnail::src
Description
public Thumbnail::src( string $path [, string $disk = NULL ] ): self
Sets the source image.
Paremeters
path
Absolute path of the source image.
disk
The filesystem diskname to load the image from. If not set will load the file without laravels filesystem.
Return Values
Returns the RolandStarke\Thumbnail\Thumbnail
object for method chaining.
Examples
<img src="{{ Thumbnail::src('cat.jpg', 'public')->smartcrop(64, 64)->url() }}">
<?php
//load from path
echo \Thumbnail::src('/path/to/file.jpg')->url();
//load from website
echo \Thumbnail::src('https://picsum.photos/200')->url();
//load from laravels pubic directory
echo \Thumbnail::src(public_path('favicon.png'))->url();
//load from Storage::disk('local')->get('user1.png')
echo \Thumbnail::src('user1.jpg', 'local')->url();