I have an image under the public folder. How can I get my image directory in symfony4 ? In symfony 3, it\'s equivalent is :
public
$webPath = $this
You can use either
$webPath = $this->get('kernel')->getProjectDir() . '/public/';
Or the parameter %kernel.project_dir%
%kernel.project_dir%
$container->getParameter('kernel.project_dir') . '/public/';