The radiography apparatus of the present invention includes a CPU 71 having a function of a lighting time limitation means to control the lighting time of light sources in such a way as to maintain a temperature at or below a predetermined temperature. In order to discriminate the type of light source connected to the device body, the setting of No. 5 pin on the CPU 71 to a high logic state or a low logic state is detected. This enables the detection of whether the light source connected to a control board 70 is a halogen lamp H or a light emitting diode (LED) L. Thus, the type of the light source is discriminated. The CPU 71 changes the controlled limiting lighting time based on the result of discrimination. This prevents the risk of incorrectly carrying out settings and enables the automatic setting for switching light sources.