Understanding the emergence of strong controversial issues in modern societies is a key issue in opinion studies. A commonly diffused idea is the fact that the increasing of homophily in social networks, due to the modern ICT, can be a driving force for opinion polarization. In this paper we address the problem with a modelling approach following three basic steps. We first introduce a network morphogenesis model to reconstruct network structures where homophily can be tuned with a parameter. We show that as homophily increases the emergence of marked topological community structures in the networks raises. Secondly, we perform an opinion dynamics process on homophily dependent networks and we show that, contrary to the common idea, homophily helps consensus formation. Finally, we introduce a tunable external media pressure and we show that, actually, the combination of homophily and media makes the media effect less effective and leads to strongly polarized opinion clusters.