PHP code example of rokka / kirby
1. Go to this page and download the library: Download rokka/kirby library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rokka / kirby example snippets
c::set('rokka.kirby.enabled', true);
c::set('rokka.kirby.organization', 'YOUR_ORG_NAME_HERE');
c::set('rokka.kirby.apikey', 'YOUR_API_KEY_HERE');
// get any image/file object
$myFile = $page->file('image.jpg');
// get url (on your webserver) for optimized thumb
$url = $myFile->rokkaCropUrl(500,500);