The paper proposes a classification algorithm based on support tensor machines which finds the maximum margin between the tensor spaces. The proposed algorithm has been deployed to classify erythemato-squamous diseases (ESDs) with the help of its features. Features are derived from the skin lesion images of ESDs, and it has been represented as second-order tensors, i.e., $$ \varvec{X} \in \varvec{ }{\mathbb{R}}^{\varvec{n}} $$ can be transformed into $$ \varvec{X} \in \,\varvec{ }{\mathbf{\Re }}^{{\varvec{n}_{1} }} \,\varvec{ } \otimes \,{\mathbf{\Re }}^{{\varvec{n}_{2} }} $$ where $$ n_{1} \times n_{2} \cong n $$. After deriving the features from the skin lesion images, dominant features are extracted using Tucker tensor decomposition method. Most of the existing machine learning algorithms depend on the vector-based learning models, and these algorithms suffer from the data overfitting problem. To resolve this problem, in this paper, tensor-based learning is implemented for classification. Proposed algorithm is evaluated with the real-time dataset (Xie et al. in: He, Liu, Krupinski, Xu (eds) Health information science, Springer, Berlin, 2012), and higher classification accuracy of 99.93–100% is achieved. The acquired results are compared with the existing machine learning algorithms, and it drives home the point that the proposed algorithm provides higher classification accuracy.