I am looking for a way to send a link to an image such as
and converting the base64 binary to a string. It doesn't matter if it's via a function in freemarker or via a Webservice. How can I do this?
Have the solution, just written a php-script:
<?php
header('Content-type: application/json; charset=utf-8');
$link = $_GET['link'];
$imagedata = file_get_contents($link);
// alternatively specify an URL, if PHP settings allow
$base64 = base64_encode($imagedata);
print($base64);
?>