The paper presents a machine-learning based framework, named VULMA (VULnerability analysis using MAchine-learning), for vulnerability analysis of existing buildings. The underlying idea is to provide an indication of the seismic vulnerability by exploiting available photographs, which can be properly processed to provide some input data for empirical vulnerability algorithms. To this scope, a complete processing pipeline has been defined, which consists in four consecutive modules offering different and specific services. The first module, Street VULMA, performs the image gathering starting from the raw data; the second module, Data VULMA, provides a mean for the data labelling and storage; the third module, Bi VULMA, uses the collected data to train several machine-learning models for image classification; the fourth module, In VULMA, performs a ranking of the images, their analysis and consequently assigns the vulnerability index. The proposed procedure has been employed on the existing building portfolio in an extended area of the municipality of Bisceglie, Puglia, Southern Italy, for which all the modules have been tested and, above all, the machine-learning models of Bi VULMA have been trained. After, in order to test the efficiency and the reliability of the proposed tools, the entire procedure has been applied on five case study buildings. The results in terms of vulnerability index have been compared with the manual computations performed by the authors applying the same algorithm. Despite the proposed tool could be improved or modified in some of its modules, the obtained results show a good effectiveness of VULMA, which opens new scenarios in the field of vulnerability assessment procedures and risk mitigation strategies.