Digital image forgery poses a potential security threat to various industries and has attracted widespread attention. Most deep learning-based models for image forgery detection depend on edge artifacts or residual compression traces. These models utilize the adaptability of convolutional neural networks to automatically extract forgery features. However, certain forgery techniques can accurately mimic the features of natural images or alter specific features to mask forgery, thereby making it difficult for the model to accurately detect tampered images. This paper introduces a wider and deeper architecture with dual-stream and multi-scales, and subsequently builds a contrastive learning-based algorithm for detecting image forgery. The algorithm fully utilizes low-level?s details and high-level semantics by a multi-scale attention module, as well as pixel-domain contents and frequency-domain edges by a dual-stream fusion module, to obtain a more comprehensive feature representation. Each image is devoted to learning a more discriminative feature representation via contrastive learning, which is achieved by minimizing the distance between forgery samples and maximizing the distance between forgery and non-forgery samples. Furthermore, this paper proposes a novel approach to addressing overfitting during model training by incorporating a constraint function into the loss function.