The partial discharge (PD) is the most common fault of transformers, which is the main factor affecting the stable operation of transformers. Therefore, the PD should be monitored and identified timely to improve the reliability of the transformers. In this paper, a transformer PD pattern recognition algorithm based on the gray-level co-occurrence matrix of optimal parameters and support vector machine (GLCMOP-SVM) is proposed. Firstly, the GLCM of optimal parameters (GLCMOP) is proposed to be determined by calculating the proportion of the off-diagonal elements (PODE) in GLCM. The GLCMOP has the advantage of avoiding the subjectivity of parameter selection and simplifying the calculation process. Then, the phase-resolved partial discharge (PRPD) maps are used as the PD samples and are converted into the GLCMOP to extract the PD features. Moreover, the feature space of the GLCMOP is dimensionally reduced by screening out the features with high distinguishability, which can improve the generalization ability and recognition speed of the classifier. Finally, the SVM classifier is trained to sort the PD samples and recognize the PD types, which include the tip discharge, surface discharge, and air discharge PD types. Lab tests are performed to verify the accuracy and validity of the proposed methodology. Compared with the traditional algorithms based on GLCM, XGBoost (eXtreme Gradient Boosting) and artificial neural network (ANN), the performance of GLCMOP-SVM is better. The GLCMOP-SVM has less memory consumption and faster recognition speed, so it is very suitable for the online and real-time monitoring of PD occurred in the transformers.