$imwg->save($cache_image_path); return Resp::inline($cache_image_path, basename($image), $lifetime); } } else { // caching is disabled $imwg = Imwg::open($image); parseOptions($imwg, $opt); return $imwg->display(); #$imwg->display(); #exit(); } } // No config file // Check if the image exists if (File::exists($image)) { return Resp::inline($image); } // No config and // no image found return Response::error('404'); }); /** * This parses the options to the Imwg Class * @param resource $imwg The Class instance * @param array $options Array with options to parse */ function parseOptions($imwg, $options) { foreach ($options as $method => $params) { //pass through all options and check if we have that method if ($method == 'display' || $method == 'image_info' || $method == 'destroy') {