KnpSnappy not rendering img from Symfony BinaryFileResponse

  file, httpresponse, knp-snappy, symfony, symfony5

In a Symfony 5.0 project I use the knp snappy bundle to render PDF.
Inluded images in the generated PDF’s are allright as long as the image path is publicly accessable.

As users have private images the rendered templates contain pathes which do not directly point to an (publicly available) image but to a URL (route) that Symfony handles.

I return a BinaryFileResponse which does serve the image – and is working on any normal html page without problems. However knp snappy times out and can’t render this images.

I am unsure on how to collect more data from knp snappy to figure out whats going on. And I don’t have an idea what to look like atm.

Any hints are very welcome.

Source: Symfony Questions