The aim of this paper is to predict the positions of the first just noticeable difference (JND) points as optimal levels of compression for images and videos based on simple features derived from the original visual signals. Three image datasets and one video dataset with subjectively defined JNDs were used in the analysis. We show that the position of the first JND point can be successfully predicted on the basis of simple image features. The highest degree of agreement with subjectively assigned JNDs was reached by features based on the gradient magnitude, where on two datasets with JPEG images their correlation is greater than 95%. On the dataset with VVC images, which has a larger number of images and a wider range of image content, the degree of agreement between gradient-based predictions and the results of subjective tests is 84%, while the correlation on the dataset with video sequences is 80%.