SummaryRobust watermarking provides valuable solutions to protect the copyright and secure digital images. In this paper, a robust and transparent watermarking scheme in the discrete cosine transform (DCT) domain is presented. The watermark is embedded into the difference of two adjacent DCT coefficients located at the same frequency. The embedding process involves optimal selection of adjacent blocks and DCT coefficients positions. For a given DCT block, the optimal selection is to find the coefficient with the lowest DCT frequency that requires the minimal variation to represent the target watermark bit. To insert the watermark, a new quantization index modulation (QIM) based method with irregular distance between continuous quantizers is employed. The performance of the proposed scheme was extensively evaluated using 12 benchmark images and a total of more than 90 attacks per image grouped into nine attack types including JPEG compression, filtering and noise contamination. Furthermore, robustness comparison with state‐of‐the‐art works was conducted, and the results demonstrate the superiority of the proposed scheme in terms of imperceptibility and robustness.