Abundant mesoscale damage occurs prior to rock destruction, and the change in porosity can reflect the dynamic mechanical characteristics of the rock. In this study, red sandstone specimens were dynamically loaded by a split Hopkinson pressure bar (SHPB) with confining pressure. The change in porosity was reflected by the new index of porosity variation rate (Rv), and the relationships between the cyclic impact and the dynamic characteristics and porosity variation were analyzed. The average filtering algorithm was emphasized to remove the noise of grayscale NMR images. It was concluded that the number of impacts before crushing gradually decreases with increasing air pressure for the overall trend, there is no obvious rebound, and the energy dissipation increases before the crushing of the specimens. There is an abrupt difference in the dynamic characteristics between the third impact and the fourth impact. The pore space changes from medium and large pores to micropores with impact loading. The peak of the microporous porosity difference curve shifts to smaller micropores. The new index can describe pore closure and expansion. The image processing method used in this work obtained accurate statistical information that confirms the presence of a large number of microcracks before crushing.