With the advancement of multimedia technology and coming of big data era, the size of image data is significantly increased. However, the traditional image encryption methods cannot solve the emerging problems of efficient compression. To settle with this challenge, an effective content-adaptive image compression and encryption method based on compressive sensing and double random phase encoding (DRPE) is proposed in this paper. The original image is converted to one low-frequency part and three high-frequency parts by DWT and then permutated by sorting-based chaotic sequences. Afterward, a novel measurement matrix optimization algorithm based on adaptive step size is presented to measure the high-frequency components. To enhance the security of the scheme, the DRPE, quantization, and diffusion are successively performed on the complex matrix composed of the shuffled low-frequency component and three measurement value matrices to obtain the cipher image. Logistic-Sine chaotic system is utilized to produce the chaotic keystreams for the encryption process, and its system parameter and initial value are determined by the information entropy of the plain image and external key parameters, so that the proposed cipher can withstand known-plaintext and chosen-plaintext attacks effectively. Numerical experiments demonstrate the effectiveness of the proposed image compression and encryption algorithm.