Lumen 5.4 + Intervention Image + Intervention ImageCache: URL Manipulation problem.
Hello,
I am Lumen newbie. Im creating an API which allow users to upload their own images and I want to use Intervention Image and Intervention ImageCache plugins. I tried to implement url manipulation from tutorial: http://image.intervention.io/use/url but its not working anyway.
What I did:
- installed intervention image - its working
- installed intervention imagecache: $img = Image::cache(function($image) { $image->make('public/foo.jpg')->resize(300, 200)->greyscale(); }); above code is working as well.
- copied imagecache config file to config/imagecache.php
- imagecache.php changes: 'route' => 'img', 'paths' => array( public_path('uploads/pets') ),
and nothing happened.
I installed some addon which allow me to use php artisan route:list and I can't see any new links. I tried to use http://localhost:8000/img/original/boo.jpg from postman but it also didn't work, so I:
- added $app->configure('imagecache'); to app.php and it showed an error that the public_path function does not exists
- added helper file with public_path function and the error disappeared but the image cache plugin is still not working.
Maybe someone had same problem or just know how to solve it? I'll be grateful for any help from your side. If you need more informations about my code/setup/anything let me know.
Thank you very much!
Please or to participate in this conversation.