An improved X-ray imaging system. The system comprises an X-Ray radiation source configured to emit an X-ray beam towards an object to be imaged and an X-ray detector configured to detect X-rays which have passed through the object. It further comprises a reconstruction processing means configured to reconstruct an image of the object based on the detected X-rays, wherein the reconstruction processing means is further configured to determining presence of at least one foreign object located in the object or located between a surface of the object and the X-Ray radiation source and/or the X-ray detector, obtaining a three-dimensional profile of the determined foreign object from a server-based foreign object database, and reconstructing an image of the object by acquiring a plurality of projection images of the object from the X-ray detector and reducing impact on image quality of an artefact that can be caused by the foreign object in the image of the object based on at least the obtained three-dimensional profile of the foreign object.