variable inside for loop is empty outside the loop
I found the solution to the issue... indeed it behave like a local variable ! if i want to use it outside of the for loop it seems that i have to set it before with something like: 

{% set imageUrl = '' %}