Slim4 - It is posible to set title in withHeader

How do I change that title using withHeader or any better way to change that title in Slim4
Screenshot (1126)

$content = file_get_contents($dir);
$response->getBody()->write($content );
$response = $response->withHeader(‘Content-Type’, ‘image/png’);

You need to send a HTML document with a title tag within the response body.

The withHeader method is to add an HTTP response header value.

I’ve always been a huge fan of Slim 3 and was bummed when moving projects I couldn’t keep using it. Now back on a Slim project and can’t wait to upgrade to v4. I really like all the things that have changed and the massive shift to “use how you like”, with great support for PSR standards.