The digital reconstruction of reservoir rock or porous media is important as it enables us to visualize and explore their real internal structures. The reservoir rocks (such as sandstone and carbonate) contain both spatial and temporal characteristics, which pose a big challenge in their characterization through routine core analysis or x-ray microcomputer tomography. While x-ray micro-computed tomography gives us three-dimensional images of the porous media, it is often impossible to quantify the variability of the pore, grains, structure, and orientation experimentally. Recently, machine learning has successfully demonstrated the reconstruction ability of reservoir rock images or any porous media. These reservoir rock images are crucial for the digital characterization of the reservoir. We propose a novel algorithm consisting of the convolutional neural network, an attention mechanism, and a recurrent neural network for the reconstruction of reservoir rock or porous media images. The attention-based convolutional recurrent neural network (ACRNN) can reconstruct a representative sample of reservoir rocks. The reconstructed image quality was checked by comparing them with the original Parker sandstone, Leopard sandstone, carbonate shale, Berea sandstone, and sandy medium images. We evaluated the reconstruction by measuring pore and throat properties, two-point probability function, and structural similarity index. Results show that ACRNN can reconstruct reservoir rock or porous media of different scales with approximately the same geometrical, statistical, and topological parameters of the reservoir rock images. This deep learning method is computationally efficient, fast, and reliable for synthetic image realizations. The model was trained and validated on real images, and the reconstructed images showed excellent concordance with the real images having almost the same pore and grain structures. The deep learning-based digital rock reconstruction of reservoir rock or porous media images can aid in rapid image generation to better understand reservoir rock or subsurface formation.