IDG (Image Domain Gridding) is an imager that makes w-term corrections and a-term corrections computationally very cheap. It works with WSClean (ascl:1408.023) and supports the same cleaning and data selections options that WSClean offers in normal mode (such as cotton-schwab, multi-frequency multi-scale cleaning, and auto-masking). IDG also allows gridding with a time-variable beam including the LOFAR, AARTFAAC and MWA beam and can perform full beam or differential correction. The code requires measurement sets with four polarizations (e.g. XX/XY/YX/YY), can apply a spatially varying time-variable TEC term that can additionally be different for different antennas and output channels, and performs extremely well on GPUs.