I need to generate some JSON content in controller and I need to get the full URL to an uploaded image situated here : /web/uploads/myimage.jpg.
/web/uploads/myimage.jpg
How can
As of Symfony 2.1 you can use:
$request->getSchemeAndHttpHost().'/uploads/myimage.jpg';
Note: This solution has the advantage to work in both DEV and PROD environments.