jbouzekri / FileUploaderBundle

Aggregate some bundles and libraries to provide easy ajax file upload integration with crop
MIT License
23 stars 7 forks source link

How to get image web path. #18

Closed anacona16 closed 7 years ago

anacona16 commented 7 years ago

Hi, I implemented the bundle and is working now, my question is, how to get the web url to show the image on a twig template?

jbouzekri commented 7 years ago

Hi @anacona16 this bundle is just a linker between OneupUploaderBundle, KnpGaufretteBundle and LiipImagineBundle

OneupUploaderBundle : manage upload of image with ajax KnpGaufretteBundle : manage image storage LiipImagineBundle : manage image processing

So you can use liip twig filter to display your image.

Something like that :

<img src="{{ myentity.image_field | imagine_filter('my_liip_filter') }}" />

Note that your liip filter should use the right data_loader which matches the configuration you used for the oneup and knp bundles