Objective: The transcriptomic classification of intrahepatic cholangiocarcinomas (iCCA) has been recently refined from two to five classes, associated with pathological features, targetable genetic alterations and survival. Despite its prognostic and therapeutic value, the classification is not routinely used in the clinic because of technical limitations, including insufficient tissue material or the cost of molecular analyses. Here, we assessed a self-supervised learning (SSL) model for predicting iCCA transcriptomic classes on whole-slide digital histological images (WSIs). Design: Transcriptomic classes defined from RNAseq data were available for all samples. The SSL method, called Giga-SSL, was used to train our model on a discovery set of 766 biopsy slides (n=137 cases) and surgical samples (n=109 cases) from 246 patients in a five-fold cross-validation scheme. The model was validated in The Cancer Genome Atlas (TCGA) (n= 29) and a French external validation set (n=32). Results: Our model showed good to very good performance in predicting the four most frequent transcriptomic class in the discovery set (area under the curve [AUC]: 0.63-0.84), especially for the hepatic stem-like class (37% of cases, AUC 0.84). The model performed equally well in predicting these four transcriptomic classes in the two validation sets, with AUCs ranging from 0.76 to 0.80 in the TCGA set and 0.62 to 0.92 in the French external set. Conclusion: We developed and validated an SSL-based model for predicting iCCA transcriptomic classes on routine histological slides of biopsy and surgical samples, which may impact iCCA management by predicting prognosis and guiding the treatment strategy.