In order to do some necessary image placement calculations, we need to get the image size on the server in nuxt/content articles. But I could not find any way to do this. The $img.getMeta method isn't reliable and doesn't seem to work (returning width: 0, height: 0). It is essential that we have the dimensions on the server already, and we don't need to have it on the client side.
When you need to place two images next to each other, giving them the same height, without cropping one of them. Then you need to do some calculations to calculate the height of both images.
Also just for optimization, adding width and height attributes to images is required to prevent any layout jumping.
This seems such a basic thing to do, but I have searched for hours and could not find any solution.
In order to do some necessary image placement calculations, we need to get the image size on the server in nuxt/content articles. But I could not find any way to do this. The $img.getMeta method isn't reliable and doesn't seem to work (returning width: 0, height: 0). It is essential that we have the dimensions on the server already, and we don't need to have it on the client side.
This seems such a basic thing to do, but I have searched for hours and could not find any solution.