X-ray imaging has a variety of applications in critical areas: it is one of the most important and common clinical tools for detection and diagnosis of disease and widely used in nondestructive testing and homeland security. Yet this technology has many limitations that hinder its deployment and render some imaging modalities, such as phase-contrast imaging, impractical in clinical and industrial settings. We show that nanophotonics is capable of addressing major limitations of both X-ray sources and detectors, an approach that could transform X-ray imaging and overcome some of its current limitations. Our first solution addresses thermal management in X-ray tubes, a commonly used type of X-ray source. Poor heat dissipation is a major cause of their demanding power requirements (e.g., a computed tomography scanner consumes the equivalent of approximately three American homes per year) and limits their brightness. We theoretically predict that by nanopatterning the anode of an X-ray tube to enhance its emissivity, more heat can be dissipated via thermal radiation across the vacuum of the X-ray tube to the housing. In turn, we show that at typical operating temperatures, the X-ray tube can either operate with higher energy efficiency due to a reduction in the cooling load or operate at ~2 times the power. This is an important step toward more energy-efficient, higher-brightness X-ray tubes. Our second solution addresses the opposite side of the system: the detector. To improve X-ray detection, there is a need for scintillators that can convert X-rays to visible light more efficiently, but most developments have relied on materials discovery, which can be slow and result in marginal improvements. We have experimentally demonstrated that nanopatterning the surface of a scintillator can enhance the brightness of X-ray images by nearly an order of magnitude. We have scaled up this material-agnostic approach to surface areas as large as 4 cm x 4 cm (competitive with commercially available unpatterned scintillator screens) and have studied 2D photonic crystals and photonic-crystal-fiber-like bulk patterns. Ultimately, our dual approach shows that nanophotonics can lead to improvements in X-ray imaging, such as better image quality, more accurate and timely diagnostics, and better patient outcomes.