imagecache icon indicating copy to clipboard operation
imagecache copied to clipboard

Intervention with imagecache get height

Open yclaes opened this issue 10 years ago • 1 comments

Hello

Is it possible to get the height from a cached image object in the way it's described here? http://image.intervention.io/api/height

This is the code we're using in Laravel 5.1 to get the image object which is working: $image->make($path);

This code we're trying to use to get the image height is not working: $image->make($path)->height();

Thanks

yclaes avatar Mar 24 '16 10:03 yclaes

You can do this by storing your actual code into a Filter class and run something like:

$img = Image::cache(function($image) {
    $image->make('foo.jpg')->filter(new FooFilter);
});

olivervogel avatar Mar 24 '16 18:03 olivervogel