TWIG dataUrl function for resized images
Found it, this works:
&lt;img src=&quot;{{ dataUrl('@webroot' ~ myAsset.getUrl({width: 200, height: 200}, true)) }}&quot; /&gt;

Two important things:

prepend the @webroot alias to the myAsset.getUrl(...)
set the second parameter of getUrl(...) to true: myAsset.getUrl({...}, true). This ensures that a real file path is returned by getUrl, because the image is transformed immediately on call. This is necessary for the dataUrl function to work. If it is not present, Craft might return a URL pointing to the image transformation controller (which transforms when called for the first time, this might go wrong here).