With the rapid spread of image editing software, anyone can easily create, distribute, and forge images. Although techniques to detect image forgery have been widely studied, current techniques have significant limitations, such as specific file formats, manipulations, or compression qualities. Although deep learning techniques have been introduced to detect various manipulations, such as blurring, median filtering, and Gaussian noise, these techniques are only suitable to detect forgeries of uncompressed images, and are difficult to apply in practice because most images are compressed for distribution. Therefore, a two-stream neural network approach for image forensics that is robust to compression is proposed. The two-stream neural network is based on constrained convolutional neural network and Markov characteristics to consider compression. Experimental results show that the proposed method overcomes current technique limitations.