There are many limitations of the current online learning platforms in the monitoring of learning behaviors and the evaluation of teaching effects. For example, the platforms cannot sense and correct the changes in the learning states and emotions of the students. To overcome the limitations, this paper tries to analyze online learning behaviors based on image emotion recognition. Firstly, the flow of image emotion recognition was detailed to facilitate the analysis of online learning behaviors, and the key frames were extracted from human face images, using improved local binary pattern (LBP) and wavelet transform. Next, the authors constructed the structure for the system of online learning behavior analysis, proposed a learning emotion recognition method based on facial expressions, and established an image emotion classification model for online learning, based on the attention mechanism. Experimental results show that the proposed algorithm is effective in analyzing online learning behaviors based on image emotion recognition.