Due to the ease of access and high storage, cloud storage has become very popular in recent days. However, uploading the image directly to the cloud server can cause the risk of privacy leakage. This paper proposes a content-based image retrieval (CBIR) mechanism by preserving the privacy content of the image. The approach initially classifies the group of image pixels into two categories namely high-level class and low-level class. The low-level class pixels are encrypted by a local encryption algorithm that encrypts. The paper proposes two encryption mechanisms namely encryption without high-level block scrambling (WO-HLBS) and encryption with high-level block scrambling (W-HLBS) that uses the position-dependent local binary pattern feature (PD-LBP) and position-independent local binary pattern feature (PI-LBP) feature extraction. The number of high-level features is chosen by the feature selection factor. The image that was encrypted was uploaded to a cloud server where the cloud server detects and extracts the features from the high-level features and store them in the cloud database. During the image retrieval, the high-level features that are extracted from the encrypted query image are matched with the features present in the cloud database to obtain the retrieval results. The evaluation of the proposed image retrieval was evaluated using the Inria Holidays dataset using the metrics such as retrieval precision and time complexity. The scheme WO-HLBS and W-HLBS provide a mean average precision of about 0.679 and 0.6295 respectively.