How do you wrap an image with a link? In Drupal 7 this was done with the l() command and setting the html option to true. I have found the Link::fromTextAndUrl() method in Drupal 8 but no mention of something similar to the html option.

[EDIT]
I think i was not clear with my original question. This is not for an image field; i was simply asking how to wrap a link around:

&lt;img src="path_to_my_img"&gt;
This way should be bulletproof:

use Drupal\Core\Link;
use Drupal\Core\Render\Markup;

$url = $node-&gt;get('field_url')-&gt;getValue();
$imageUri = $node-&gt;get('field_image')-&gt;entity-&gt;getFileUri();
$image = [
  '#theme' =&gt; 'image_style',
  '#style_name' =&gt; 'medium',
  '#uri' =&gt; $imageUri,
  '#width' =&gt; 200,
  '#height' =&gt; 100
];
$rendered = render($image)
$linkMarkup = Markup::create($rendered);
$link = Link::fromTextAndUrl($linkMarkup, $url);
$link = $link-&gt;toRenderable();
render($link)