Image-domain wavefield tomography is a velocity model building technique using seismic images as the input and seismic wavefields as the information carrier. However, the method suffers from the uneven illumination problem when it applies a penalty operator to highlighting image inaccuracies due to the velocity model error. The uneven illumination caused by complex geology such as salt or by incomplete data creates defocusing in common-image gathers even when the migration velocity model is correct. This additional defocusing violates the wavefield tomography assumption stating that the migrated images are perfectly focused in the case of the correct model. Therefore, defocusing rising from illumination mixes with defocusing rising from the model errors and degrades the model reconstruction. We addressed this problem by incorporating the illumination effects into the penalty operator such that only the defocusing by model errors was used for model construction. This was done by first characterizing the illumination defocusing in gathers by illumination analysis. Then an illumination-based penalty was constructed that does not penalize the illumination defocusing. This method improved the robustness and effectiveness of image-domain wavefield tomography applied in areas characterized by poor illumination. Our tests on synthetic examples demonstrated that velocity models were more accurately reconstructed by our method using the illumination compensation, leading to a more accurate model and better subsurface images than those in the conventional approach without illumination compensation.