I'm using LiipImagineBundle and AWS SDK in one project. Everything works fine, but now I want to create a watermark filter. In the Liip doc, they say we must inform in the configuration what the path of the watermark image is.
My problem is that this path is dynamic as it can change from one image to another. And it is also stored in S3.
In an older version of Liip, I had extended the ImagineController to added some logic. However, the bundle has completely changed and what I used to do don't work anymore.
I also saw a solution on github where the developer was adding a configuration to the filter in twig. I tried it but it didn't work:
{% set runtimeConfig = {"watermark": {"size": 1, "image": 'http://' ~ amazon_s3_media_url ~ '/establishment/' ~ establishment.watermarkPath, "position": 'bottom' }} %}
{% set url_photo_medium = photo.imagepath | imagine_filter('photo_high', runtimeConfig) %}
<img src="{{ url_photo_medium }}" alt="">
I'm not sure this would be a great solution even if it works because it is not dynamic. Does anybody know what the best solution for this problem is?
Thanks!