How to get image info from lifecycle hook

Currently I’m just fetching the image out of

/uploads/files/${imageId}

Is it correct way, or I can use something like strapi.getFileEntity(id)