Courtship in Drosophila involves exchange of chemosensory, auditory, tactile and visual signals. Differences in courtship signals are strongly influenced by environmental factors, among which nutrition plays one of the more important roles. Through influence on development, morphology, physiology and behaviour, nutrition may affect both sexual selection and isolation. However, the impact of specific nutritive regimes on male mating success has not been extensively studied. Therefore, the aim of this study was to explore how diets affect male attractiveness via changes in wing morphology during long-term rearing of flies on different diets. Through a series of female choice tests, we investigated the mating success of males reared on five different diets for more than 350 generations. Further, we analysed wing size and wing shape of mated and unmated males to link wing morphology with mating success. The results demonstrate significant differences in male mating success between strains. We also found significant differences in wing size between the strains and established that female choice is positively correlated with male wing size, that is, females of all strains preferred males with larger wings. In addition, we noted a significant difference in wing shape between the strains, as well as between mated and unmated males. Our results indicated that among strains, males with elongated wings were more successful in mating than males with rounded wings. Within strains, mated males had more elongated wings than unmated ones, which had more rounded wings. Our results support the hypothesis that nutrition represents an important environmental factor that may affect male attractiveness via changes in wing morphology, thereby playing an important role in sexual selection of Drosophila melanogaster . • Male mating success of Drosophila is related to wing size and shape. • Wing morphology in D. melanogaster may depend on diet. • In this study, we used flies reared for 350 generations on different diets. • Larger males reared on a tomato diet had the highest mating success. • Males with elongated wings had higher mating success than those with rounded wings.