twig extension to convert image in base64