Gaufrette is a file system abstraction library, seems like it doesn't implement any routing options for the files.
First option is creating a public route for your Gaufrette file system folder and reach the files as @Broncha mentioned.
The other option is;
You can use Base64 encode to show images in the template, without passing a url for the image.
For e.q
<?php
require_once('vendor/autoload.php');
use Gaufrette\Filesystem;
use Gaufrette\File;
use Gaufrette\Adapter\Local as LocalAdapter;
$adapter = new LocalAdapter('files');
$filesystem = new Filesystem($adapter);
$loader = new Twig_Loader_Filesystem('templates');
$twig = new Twig_Environment($loader, array(
'cache' => 'tmp',
));
//Probably the top part is redundant for you
//I've just set up a local twig and Gaufrette environment.
$file_key = "shareimage.png";
$file = $filesystem->get($file_key);
echo $twig->render('index.html', array('imageContent' => "data: ".$file->getMtime().";base64,".base64_encode($file->getContent())));
This is the simple template file;
<html>
<body>
<img src="{{imageContent}}" alt="Image" />
</body>
</html>