The quality of migration images depends on the accuracy of the velocity model. For large velocity errors, the migration image is strongly distorted, which unflattens events in the common image gathers and consequently leads to a blurring in the stacked migration image. To mitigate this problem, we propose dynamic image warping to flatten the common image gathers before stacking and to enhance the signal-to-noise ratio of the migration image. Numerical tests on the Marmousi model and GOM data show that image warping of the prestack images followed by stacking leads to much better resolved reflectors than the original migration image. The problem, however, is that the reflector locations have increased uncertainty because the wrong velocity model is still used.