How do I get the dimensions of an image, loaded from the assets folder

Hi,

how can I get the dimension of an image, that I’m loading from my assets folder?
I tried the following

$filePath = $kirby->root('assets') . '/image.jpg';
$asset = new Asset($filePath);
$img = new Image($asset);
$thumb = $asset->thumb();

but when I call ->dimensions() on an any of the objects, the result of width and height is always 0.
I obvioulsy am missing a step here.

Ok,
nevermind. I’m using kirby-vite by arnoson. It’s probably because of the wrong file path.

Edit, for future reference:
I added an ‘assets’ folder manually in the public directory and placed the image there.
See this issue for further explanation.