![]() You can use Kirby's $image->srcset() method to easily create the srcset attribute for responsive images. $file->thumb('blurred') Responsive images in your templates: $file->thumb() // for default preset You can define option presets for thumbs in your config.php: /site/config/config.php return [ Otherwise you will need to override the default quite a lot. This is only recommended if you find yourself converting 90% of your files to that format anyway. ![]() You can set a default format option in your config file and convert all images unless you override the format option in the thumb method. Options for thumbnails are set with the thumbs key in Kirby's configuration: /site/config/config.php return [ $image->grayscale() Configuring your thumbnails The grayscale method converts an image to grayscale. You can modify the intensity of the blur effect by passing an integer. The blur method applies a blur filter to an image. This is how to use the crop positions in your code: // quick and simple The following crop options are available: ![]() You can set from which position a file should be cropped. $image->resize(300, 200) Cropping images Square $image->crop(100) Crop by width and height $image->crop(100, 200) Crop positions In a default setup, thumbnails are stored in the /media folder. This makes thumb creation feel a lot faster and creates less memory issues, which could easily become an issue with many images or when creating many different images sizes to serve responsive images.Ī new set of plugin points can be used to hook into the thumbnail API or the thumbnail URLs, see core components. With Kirby's new Thumbnail API, thumbs are generated asynchronously. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |