Images and Files - systeminc/laravel-admin GitHub Wiki

With our panel, you could manipulate with images and files.

All our files are stored at storage/app and saved in our database by storage_key so we need to provide you a URL to file. It is tested for Local storage, but feel free to send a review on another storage driver.

To generate link to a file use:

SLA::getFile($file_name)

To generate an progressive image with specific dimensions use:

SLA::getImage($image, $width, $height)

You can use only width or height to resize the image to given dimension, keeping the aspect ratio of the image. If both are given, image will be fitted in that canvas, also preserving the aspect ratio.

Note

Some of our modules, like Gallery, have built in url() method that can return a URL of the image or a file. This is useful because we store storage key as a source.