City image is essential for city marketing, yet the impact of “outside–in” shaping by social media in the Web 2.0 era has been largely overlooked. The decentralized and diverse Web 2.0 environment now dominates online information dissemination, influencing not just cyberspace, but also the physical urban landscape. These externally driven city images increasingly reflect and interact with traditional “inside–out” images shaped by official sources. Understanding the influence of external actors via social media compared to traditional internal sources, like government websites, is crucial. This dual analysis offers insights into city image formation, helping cities refine their marketing strategies. This study analyzed a representative social media platform alongside official government websites, using programming and a naive Bayes classifier. We developed a method to categorize the city images of selected U.S. world cities based on these two different media sources. The results are as follows: (1) We establish a city image categorization system that divides the considered U.S. world cities into four and five categories based on social media and official government website content, respectively. (2) We compare the groups and logics shaping global city images in different cyber eras based on the example of the U.S. world cities, and based on this, we explore the relative roles of groups outside the city. (3) We identify the preferences of forming different city images between external groups based on social media and internal forces based on government websites. In summary, this article takes world cities as an example to demonstrate that, in the Web 2.0 era, the image of a city depends on both internal and external groups and has varying degrees of preference. The unique urban image of each city is formed through two media content streams and quantitative preference.