Craft 3 Plugin: Saved image asset has no width / height In my Craft 3 Plugin I am saving an image (YouTube poster) to an asset volume like this:

$asset = new Asset();
$asset-&gt;title = $url;
$asset-&gt;tempFilePath = $tmpPath; // temp path for image in /storage/runtime/temp/
$asset-&gt;volumeId = $volumeId; // ID of my Asset Volume
$asset-&gt;filename = $filename; // filename like youtube_&lt;youTubeKey&gt;.jpg
$asset-&gt;newFolderId = $folder-&gt;id; // root folder id of the volume
$asset-&gt;avoidFilenameConflicts = true;
$asset-&gt;setScenario(Asset::SCENARIO_CREATE);
clearstatcache();
list ($w, $h) = Image::imageSize($tmpPath);
$asset-&gt;setWidth($w);
$asset-&gt;setHeight($h);
$result = Craft::$app-&gt;getElements()-&gt;saveElement($asset);


The image saved does not have width or height (so it's there while saving), so if I later output its width like this in TWIG: {{ dump(img.width) }} it will be NULL.

Any hints what I need to call so that craft persists the image width / height?
As Andris Sevcenko pointed out, the problem is Craft 3 Beta 22 and a Multisite Configuration. Fixed in Beta 23.