The emerging compressive sensing (CS) theory provides a paradigm for image compression. Most current efforts in CS-based image compression have been focused on enhancing the objective coding efficiency. In order to achieve a maximal perceptual quality under the measurements budget constraint, we propose a perceptual rate-distortion optimized (RDO) CS-based image codec in this paper. By incorporating both the human visual system characteristics and the signal sparsity into a RDO model designed for the block compressive sensing framework, the measurements allocation for each block is formulated as an optimization problem, which can be efficiently solved by the Lagrangian relaxation method. After the optimal measurement number is determined, each block is adaptively sampled using an image-dependent measurement matrix. To make our proposed codec applicable to different scenarios, we also propose two solutions to implement the perceptual RDO measurements allocation technique: one at the encoder side and the other at the decoder side. The experimental results show that our codec outperforms the other existing CS-based image codecs in terms of both objective and subjective performances. In particular, our codec can also achieve a low complexity encoder by adopting the decoder-based solution for the perceptual RDO measurements allocation.