With the increasing number of personal images,cloud services are beginning to play an important role in im-age storage.However,uploading images to the cloud leads to privacy threats.Traditional encryption schemes that simply en-crypt images can protect image privacy,but they sacrifice the usability of the image content.In recent years,thumbnail preser-ving encryption(TPE)has been proposed to make images available to users in the cloud without being identified by illegal third parties with the unchanged thumbnails after encryption.However,existing TPE schemes do not take account of the privacy threat to images from machine learning.We propose a new TPE scheme that improves the ability of the algorithm to protect image privacy information from a new perspective by combating deep learning models in the encryption process.Experiments show that the proposed scheme is able to resist image recognition by human eyes and deep neural networks while the image is usable.