Hi I'm using LiipImagineBundle to display an image in symfony web site.
I'm following this documentation: https://github.com/liip/LiipImagineBundle
Here is the config.yml:
liip_imagine:
resolvers:
default:
web_path: ~
filter_sets:
cache: ~
news_detail:
filters:
thumbnail: { size: [800, 263], mode: outbound }
My image in my twig file:
<img src="{{ asset("uploads/media/" ~ news.imageName) | imagine_filter("news_detail") }}" alt="Image {{ news.title | capitalize }}">
My routing.yml:
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.xml"
The config of the bundle generate this path (But this path does not exist):
http://local.dev/media/cache/resolve/news_detail/uploads/media/test.jpg
This path (bellow) works when I'm overriding the HTML with the inspector:
http://local.dev/uploads/media/test.jpg
I'm following the documentation but I don't understand why It does not work and what is the configuration of the cache system...
I found the problem. The bundle used the exif
extension, so I had to install it in php.
I use docker so here is the solution with docker:
RUN apt-get update && apt-get install -y libexif-dev
RUN docker-php-ext-install exif