We propose an adaptive watermarking technique that is robust to JPEG compression and sensitive to malicious manipulations, including counterfeiting attacks. The watermarking technique includes three major functions: generating content-based watermarks, hybrid watermarking, and calibration. Two features, invariant to JPEG compression, used to generate content-based watermarks increase the resistance to counterfeiting attacks. The watermarks are embedded using various strategies, depending on the characteristics of discrete cosine transform (DCT) coefficients. Finally, two calibration functions are used to increase the accuracy of authentication. Experimental results demonstrate that the proposed watermarking technique can blindly localize tampered areas, is robust to JPEG compression, and is sensitive to malicious manipulations, including counterfeiting attacks.