An efficient and secure environment is necessary for data transmission and storage, especially for large-column multimedia data. In this study, a novel compression–encryption scheme is presented using a fractal dictionary and Julia set. For the compression in this scheme, fractal dictionary encoding not only reduces time consumption, but also gives good quality image reconstruction. For the encryption in the scheme, the key has large key space and high sensitivity, even to tiny perturbation. Besides, the stream cipher encryption and the diffusion process adopted in this study help spread perturbation in the plaintext, achieving high plain sensitivity and giving an effective resistance to chosen-plaintext attacks.