Introduction

Images can depict and shape realities and mirror societal perspectives [1, 2]. Notably, visual representations linked to social groups, like immigrants, often reflect attributes of the social context where they’re created or employed [2].

Emotions play a central role in visualising social groups and affect how they are perceived or how discourses linked to those groups are conveyed. For example, the facial expression of emotions by specific groups can communicate dominance, affiliation or status or reflect gender stereotypes [3,4,5]. Therefore, the emotions individuals exhibit in images associated with a specific group can be expected to align with the characteristics of the social context in which such visual content is created or employed. In particular, immigrants are frequently subjected to biased associations linked with specific emotions [6,7,8].

This study explores the emotions in media visual content associated with immigrants and its correlation with the socioeconomic context. While extensive attention has been given to how media influences public perceptions, perpetuating societal biases and reinforcing simplified depictions of specific social groups [6, 9,10,11,12,13,14], little emphasis has been placed on understanding how the social context influences media production and messaging. Particularly, this research seeks to uncover how emotional content within images associated with immigrants relates to the socioeconomic context as described by socioeconomic indicators.

Migration in images

When discussing migration-related topics, there’s often a lack of clarity in defining terms like “migrant,” “refugee,” and “asylum seeker,” leading to their interchangeable use despite distinct meanings and legal implications [8]. For precision, we adhere to the International Organization for Migration (IOM) definition: “Immigrant: From the perspective of the country of arrival, a person who moves into a country other than that of their nationality or usual residence, so that the country of destination effectively becomes his or her new country of usual residence” [15].

It’s crucial to note that this definition encompasses various migration motives, like work, study, or family-related reasons, extending beyond vulnerable individuals fleeing crises like violence or famine in their home countries. This clarification is essential as it distinguishes immigrants from refugees or asylum seekers, a common misconception perpetuated in media narratives. While international migrants constitute 3.6% of the global population [16], refugees and asylum seekers represent only around 10% of them; for example, in the European Union, that group comprises approximately 5% of the migrant population [17]. However, media depictions often align more closely with asylum seekers [8]. This discrepancy between the genuine definition of immigrants and their portrayal in media is vital to consider when scrutinizing representations and media content associated with them.

Several studies have examined how different media outlets portray immigrants, especially in television shows and in the news [18,19,20,21,22,23,24]. In particular, it has been evidenced that the coverage of emotionally charged issues has a more substantial influence on opinions than coverage of complex policy matters, particularly concerning problems associated with polarised and politicised divisions within society [25]. Moreover, it has been found that the portrayal of immigrants often depicts them as illegal, a threat or causative of negative economic consequences [24, 26]. In addition, the media also tends to ethnicise immigrants and not treat them as individuals; for example, in the USA, immigrants tend to be associated mainly with “Latin Americans” [27], or in Germany, they tend to be portrayed through a negative lens, and most usually as a homogeneous group rather than as individuals [28].

The social identity approach provides insights into how individuals categorise themselves and others into in-groups and out-groups, influencing their perceptions and behaviours [29]. This framework has been crucial in exploring the impact of media portrayals of immigrants on viewers. Research has shown that negative news about immigrants can trigger hostility towards that out-group while promoting favouritism towards the in-group [30]. Furthermore, the emotional tone of the news can have implications for attitudes towards immigrants who are categorised as out-groups. Negative news tends to reinforce stereotypical views among the public, while frequent exposure to positive news can reduce negative attitudes. However, these effects were observed only in individuals who are not well-informed [31].

Fewer studies analyse the emotions in the visual portrayal of immigrants, and they mainly focus on refugees and asylum seekers. For example, it has been reported that in the characterisation of “refugees” in newspapers during the so-called “refugee crisis”, the frequency of facial expressions associated with positive emotions (happy and grateful) was low (between 7.6 and 21%), while negative facial expressions (fearful, angry, or desperate) were more predominant (between 31 and 58%) [32]. Similarly, when focusing on the gestural expressions in images during the so-called “European migrant crisis”, displays of suffering were more common (76.6%) than positive expressions (32.2%) [33]. More recently, it has been shown that emotions in pictures associated with migrants in different countries are predominantly negative and align with literature on emotional, gender stereotypes, and predominant views of masculinity [8].

Typically, existing studies have concentrated explicitly on the emotions immigrants display in media depictions rather than exploring the emotions captured in images linked to discussions about immigration in general. The distinction between these two approaches is crucial. When images are connected to immigration, even if they don’t directly depict immigrants, the emotions transmitted in those images usually relate to immigrants or migration-related issues. For instance, a photograph featuring an angry politician discussing immigration can easily convey and associate negative emotions with immigrants and immigration-related matters, even if immigrants are not portrayed in the photograph.

Emotions and the perception of social groups

It has been established that exposure to media repeatedly presenting stereotypical content can significantly influence our attitudes and impact how we analyse and remember information about ourselves and others [34]. These effects emerge when certain features are consistently linked to a particular social group in various situations or contexts within a given society [35]. These features may include emotional associations attributed to a specific population. For example, research has demonstrated a connection between media consumption and the development of negative inter-group emotions directed towards particular social groups [36, 37].

Given that the processes of forming and reinforcing stereotypes and perceptions are dynamic, it becomes evident that societal perspectives are not only shaped by media content but also influence its creation. That suggests that specific characteristics in media visual content mirror and propagate established societal traits [2, 38].

Emotions are particularly linked to certain stereotypes. For example, rich individuals are more often associated with positive emotions, while poor individuals with negative emotions [5]. Similarly, women are stereotyped to experience and express a broader range of emotions than men, except for anger and pride [39]. Other stereotypes differentiate gender in terms of perceived dominance and affiliation or status conferral. For instance, female professionals expressing anger are conferred lower status than male professionals expressing anger [3, 40]. These phenomena are part of a dynamic process where preexisting perceptions shape and are shaped by stereotyping practices. As emotions also play a significant role in visual content associated with social groups, emphasising specific emotions in visuals related to a particular social group can reflect the characteristics of the social context in which such content is produced.

Regarding migration, the portrayal of immigrants often emphasises a framing where they are portrayed as a threat, in need of assistance, unhealthy, and culturally very different [24, 26]. However, public discourse often oscillates between framing immigrants as either threats or benefits for the host country, impacting the acceptance of migration within the host society [41]. For example, whether immigrants are viewed as threatening or advantageous directly influences the support or rejection of specific migration-related legislation [42].

That also indicates that in the production of media images related to immigration, emotions can be used as a framing tool to influence opinions. Different framings can elicit specific emotional responses in those who view such visual content [7, 43, 44]. However, such effects cannot be measured from the visual content itself; therefore, this kind of impact is beyond the scope of the present work.

Social contexts and its relevance

The social context, which refers to the larger group an individual belongs to and is characterized by social, economic and cultural aspects, has a significant influence in shaping perceptions about topics such as immigration and has a more significant impact on attitudes than transient information [45, 46]. The social context can be more influential than an individual’s socio-demographic circumstances in shaping political attitudes, behaviour, and stereotyping of social groups [47, 48]. Therefore, the average characteristics of a specific social context can be considered influential in shaping perceptions and attitudes.

Perceptions of immigration and their effects can vary among countries based on historical context, macroeconomic conditions, discourses and policies surrounding immigration and be influenced by the ideological climate and political narratives [49, 50]. Similarly, these attitudes can be influenced by factors such as the number of immigrants in the country, the economic impact of migration, and the prevailing economic conditions [51]. In this work, we focus on the socioeconomic aspects that are measured by different indexes.

Socioeconomic indexes are a way to describe specific characteristics of a given context. They have been created to facilitate comparisons between countries and to help formulate targeted policies. Some prominent examples are corruption perception indexes and gender equality indexes. These indexes simplify complex phenomena such as corruption and gender equality, making it easier to compare them across nations. Indexes can provide valuable insights and promote comparability of specific phenomena within countries. Our study examines socioeconomic indexes as indicators of specific phenomena and evaluates their correlation with emotional information in images associated with immigrants in selected societies. However, we also recognize that indexes inherently possess partiality for various reasons. The process of creating an index involves excluding multiple possibilities, which can lead to incomplete results. Additionally, institutional definitions that shape the construction of indexes embody inherent biases and constraints. We take these limitations into account when interpreting results and drawing conclusions.

In migration studies, socioeconomic indicators have been commonly used as analytical tools to, for example, assess their correlation with the well-being of immigrants [52, 53]. However, to the best of our knowledge, there have not been research efforts to explore the link between socioeconomic indicators and the characteristics of visual content associated with immigrants.

Indexes, behaviours and attitudes

Economic inequality, understood as the extent to which income distribution within a country deviates from a perfectly equal distribution, is a socioeconomic variable associated with some attitudes and behaviours. Evidence indicates that the less economic inequality in a society, the more cooperative behaviours are displayed by individuals. In contrast, more economic inequality fosters more competition and expectation of something in return in social relationships [54]. That effect is related to members’ perceived vulnerability in a given society and their access to resources. Inequality has been shown to cause those with fewer resources to focus on the threat of losing in the competition posed by social stressors in their environment and be more likely to appraise a situation associated with such stressors as threatening. In contrast, those with enough resources in an unequal environment may appraise social stressors as a challenge [55].

A particular kind of social stressors emerges from the perception by members of one group that another group may cause them material or symbolic harm. That is known as inter-group threat [56] and is linked to the social identity approach, where individuals categorize themselves and others into in-groups and out-groups [29]. Immigrants, seen as out-groups, can be perceived as social stressors associated with threat, mainly when there is higher perceived competition for resources, which can cause prejudice and discrimination against them [57]. Moreover, when high levels of inequality are present, other societal factors can be less relevant in shaping attitudes. For example, political ideologies (left-right political predispositions) have been found to potentially affect the perception of immigrants, positively or negatively, only when the socioeconomic vulnerability of citizens is low [58]. In situations where competition for limited resources intensifies -such as in contexts marked by significant economic inequality- political ideology tends to have a diminished influence. Moreover, inequality significantly shapes the openness of immigration policies. Specifically, the ratio between the wages of unskilled workers and the average income per capita plays a pivotal role. Higher wages among the lower-income brackets tend to correlate with more permissive immigration policies [59].

Consequently, it can be expected that inequality correlates with the characteristics of visuals associated with immigrants, as more economic inequality would cause an increased focus on the struggle for resources, increasing the likelihood of perceiving out-groups, such as immigrants, as a threat. In contrast, lower levels of inequality would lead to more cooperative perspectives that, in turn, get reflected in more positive emotional information in images. Moreover, we can extend these arguments to other variables that, directly or indirectly, measure factors related to the accessibility of resources by members of a society or that are associated with inequality.

Numerous socioeconomic indicators are connected to economic inequality, including gender equality, educational equity, poverty rates, and Gross Domestic Product (GDP) per capita. However, the perception of corruption in a society stands out as the primary variable linked to economic inequality. Evidence suggests that inequality fosters perceptions of corruption and strengthens social norms related to dishonest behaviours [60]. Moreover, corruption is also likely to reproduce and accentuate existing inequalities [61]. Though other economic factors can moderate the relationship between inequality and corruption [62], both variables are central in shaping attitudes thus can modulate the perception and discourses on migration. Moreover, when it comes to behaviours associated with emotions, it has been shown that higher levels of perceived corruption tend to undermine the pro-social perception of smiling and affect trust toward smiling individuals [63]. As the perception of corruption is fostered by inequality and is a driver of specific attitudes and behaviours, corruption could be expected to mediate the relationships between inequality and the visual portrayal of immigration-related discourses.

Corruption has been studied as a push and pull factor for migration. Evidence indicates that as corruption increases, the emigration rate also increases, particularly of high-skilled migrants, while low corruption tends to increase immigration rates [64,65,66]. Moreover, corruption and weak government policies contribute to the rise in irregular migration and human trafficking [67, 68]. That can also affect the perception of immigrants as they end up associated with, often stereotyped, negative characteristics linked with illegal immigrants [69]. On the other hand, contrary to some common assumptions, immigration is generally not linked to increased corruption in receiving countries; instead, migration tends to be associated with a reduction in corruption in countries with low levels of corruption or high levels of economic freedom [70]. That suggests that the perception of corruption might not be directly tied to the societal perception of immigrants as drivers of corruption. Instead, any association between perceptions of corruption and views on immigration may be attributable to other social phenomena affecting these two variable, such as perceived competition for resources or scarcity.

Several studies underscore the associations between corruption and a country’s economic growth and development measured as GDP per capita. One study demonstrated a significant decrease in real per capita GDP by approximately 17%, with an increase in the reversed Corruption Perceptions Index by one standard deviation [71]. This finding aligns with the broader understanding that higher levels of corruption and shadow economy correlate strongly with limited economic and development prospects [72, 73]. Another investigation highlighted the close association between corruption levels and a country’s development stage, showing that ranking countries based on the perception of corruption mirrored states’ economic performance, as measured by GDP per capita [74].

The results presented in [75] indicate that both GDP and refugee rates predict the approval of specific migration criteria between either ascribed (categorical qualities related to inherent, collective characteristics that define a social group, like religion or ethnicity) and acquired (individual competence and attitudes that can facilitate adaptation to the host country, like education or work experience) criteria. These criteria can, in turn, be associated with perceived threads by a social group (ascribed criteria) and the potential benefits of specific immigrants (acquired criteria). For example, the higher levels of education and socioeconomic status of established immigrants, the less they are perceived as a threat [76]. That indicates that perception of immigration can potentially be affected by variables such as GDP or refugee rates as reflected in attitudes towards specific policies.

Moreover, research emphasised that corruption finds its best explanation in GDP per capita, surpassing other macroeconomic indicators. That suggests that societal wealth plays a pivotal role in mitigating corruption, as individuals in affluent societies may have less inclination towards engaging in corrupt practices due to reduced incentives when living in resource-abundant environments [77]. This evidence is not enough to claim any causal relation but clearly shows that these two variables are highly intertwined, and further supports the relationship between corruption and resource availability.

Existing literature also suggests connections between unemployment and the public perception of immigrants in receiving countries. Regions with higher immigrant unemployment tend to see natives expressing negative views on immigration [78]. Also, low-skilled workers tend to misattribute blame for economic challenges such as unemployment towards immigrants rather than the influence of technology and automation [79]. Furthermore, evidence indicates that labour market vulnerability is correlated with more negative beliefs about the economic contributions of immigrants, particularly in countries with higher GDP per capita [80]. In that sense, resource availability in the overall economy, rather than just the labour market, significantly influences attitudes toward immigration.

The population of immigrants in a given community can also influence the perceptions of migration. Specifically, the size of the foreign-born population and the presence of migrants and refugees in a country can significantly impact public opinion on migration policies [81]. More immigrant residents have been associated with more negative views on immigration [78]. Furthermore, the attitude towards immigrants has also been linked with indicators of “immigrants’ integration” or, at least, with the population’s perceptions about the characteristics of integration policies. In particular, more permissive immigrant integration policies are associated with decreased perceptions of immigrants, particularly asylum-seekers, as a threat [82].

Links between political stability and migration have also been highlighted, suggesting that politically stable regions tend to attract more migration, particularly from nations experiencing less stability [83, 84]. Likewise, correlations have been identified between political stability and reduced corruption, implying that greater stability might coincide with lower levels of corruption [85, 86]. Given that migrant population sizes and corruption are associated with factors shaping attitudes towards immigration, it’s reasonable to anticipate a connection between political stability and attitudes towards immigrants. However, the relationship between political stability and corruption remains ambiguous [87, 88], complicating the determination of their relative significance as predictors.

Previous research has also delved into the connection between education levels and attitudes towards migration, uncovering significant insights. Notably, better-educated individuals tend to express lower opposition to migration than those with lower education levels. However, these differences are attributed to the mediation effect of feelings of threat, as lower educated individuals might find themself in more vulnerable situations [89]. Additionally, individual skills and pro-immigration attitudes exhibit a positive correlation in countries where the skill composition of natives relative to immigrants is high, and this correlation varies based on the GDP per capita of the country, with higher-skilled individuals more likely to support immigration in high per capita GDP countries [90]. So, there is evidence that education can be an essential factor in the perception of immigrants. However, these effects are more prominent at the individual than the group level.

Finally, the associations in visuals linked to immigrants can be gender-specific. A consistent trend emerges in examining women’s representation in various media contexts: women tend to be underrepresented and are often depicted in constrained roles [91, 92]. This gender disparity in coverage raises questions about the alignment of media representations with actual immigration statistics and underscores the problematic nature of gender discrepancies within migration-related discourses. Moreover, the portrayals of immigrant women commonly involve sexualisation through attire and subordinate positioning or an emphasis on traditional and stereotypical feminine roles like homemakers, parents, and nonprofessionals [91]. Notably, when discussing economic aspects, migrant men receive more attention, while in discussions around cultural aspects, migrant women are highlighted [93]. That last point might suggest that the emotions in images associated with immigrant men are more negative across contexts, as the economic-related discourses on immigration often highlight the negative side of it. Consequently, it could be expected that the emotions in pictures associated with immigrant women are more dependent on the socioeconomic context than those of men.

The current study

Goals

This study analyses the emotions in immigration-related media visual content across countries and its relationship with the socioeconomic context. Our primary objective is to assess the potential correlation between socioeconomic indicators and the emotional content depicted in media images associated with immigrants.

Theory indicates that emotional characteristics in visuals associated with immigrants appearing consistently in various settings in a given society can be regarded as a central feature reflecting how they are perceived in that social context [35]. Therefore, a relationship between the features in images associated with immigrants and the characteristics of the social context as described by socioeconomic indexes is expected. Moreover, studying how contextual variables affect the depictions deems a comparative study across countries necessary.

Therefore, we analyze the emotional information portrayed in media images associated with immigrants in various countries. To achieve this, we examine images found online and in different media outlets through a search engine. By doing this, we aim to observe the central emotional features in various countries and obtain the average emotional information as an indicator of the emotions the media focuses on in a specific social context. Accordingly, our units of analysis will be countries.

Hypotheses

Existing literature suggests that immigrants, often perceived as out-groups, may be viewed as social stressors in societies with heightened competition for resources, especially when resource competition intensifies [56, 58]. This competition often relates to income inequality and the average income within a society. Consequently, higher income levels tend to mitigate negative perceptions about immigration [59]. Moreover, considering the strong link between corruption and inequality [60,61,62], it is anticipated that increased perceptions of corruption might contribute to more negative attitudes toward immigrants or which emotions are associated with individuals of that group [63]. Therefore, we hypothesise that:

  • There is a positive relationship between the perception of corruption (higher values imply less perceived corruption), GDP per capita, and the emotional information in images.

As highlighted above, there are differences in the portrayal of immigration-related discourses when these focus on men or women [91,92,93], and some of the studied differences suggest that the emotions in pictures associated with immigrant women are more dependent on the socioeconomic context than those of men. Hence, we hypothesise that:

  • The relationships between socioeconomic indexes and emotional information differ for images associated with immigrant men and women and are stronger for pictures related to immigrant women than with immigrant men.

As the perception of corruption often arises from inequality and both factors significantly influence attitudes and behaviours [60,61,62,63], it’s plausible that corruption might act as a mediating factor between inequality and the emotional content of images associated with immigrants. Accordingly, we hypothesise that:

  • The perception of corruption mediates the relationship between income inequality and the emotional information in images associated with immigrants.

To test these hypotheses, we will study the media images associated with immigrants in 45 countries and use socioeconomic indicators as explanatory variables of the observed emotional information in such media images. We will perform analyses with linear models, where the explanatory variables are socioeconomic indexes, and the response variable is the average emotional information in pictures associated with immigrants in a given country measured in terms of how positive or negative emotions are.

Methods

Our first aim is to evaluate emotions conveyed in media images associated with immigrants across multiple countries. We focus on acquiring relevant images and extracting emotional cues from facial expressions. It’s essential to clarify that our goal isn’t to identify the emotions of immigrants in these images, given the impracticality of determining immigrant status solely from a picture. Instead, our focus is estimating the emotions depicted in images linked to immigrants, irrespective of the individuals portrayed. The underlying assumption is that these emotions reflect migration narratives prevalent in media.

Our methodology analyses the emotional content of immigration-related media images in specific countries. Rather than targeting specific media outlets, we utilize search engine results as a sample of various pertinent media sources, linking their relevance to their appearance in search results. With this procedure, we assume the most relevant outlets and the most recent images published by them are sampled. To ensure accuracy, we filter these results to include only media outlets whose locations align with the intended country of the search.

Moreover, while discerning immigrants from non-immigrants in images-and thus focusing solely on their emotions-is unfeasible, our focus isn’t specifically on the emotions of depicted immigrants. Instead, we aim to study the emotional information conveyed by images associated with this group, regardless of the individuals present. Consequently, our analysis encompasses the emotions of any person depicted, as these emotions are part of the conveyed message associated with immigrants. Therefore, even if images related to immigrants feature non-immigrants-such as politicians-the emotions highlighted in the image are still intertwined with the discourse on migration prevalent in that social context.

Images collection

We retrieve images using the Google Cloud Platform and the Custom Search API. The search term “Immigrants” is defined in English, and the Translate API is used to get the corresponding search terms in the primary official language of each of the studied countries (listed below) and set the geolocation tag to the specific country of interest per search. We downloaded 100 images on average per each of the selected countries. The image collection process occurred in November 2023, limiting the search to content within one year in the API calls. However, some results included links to articles predating this limit. We estimated publication dates per website to ensure accuracy, using the library presented in [94], and only those published after November 2021 were retained. Articles with unverifiable publication dates were removed from the dataset. As a result, 84% of the data analysed was published in 2023, 12% in 2022, and 4% in 2021.

Furthermore, as different effects can be expected for male and female immigrants, images associated with the search terms “Immigrant men” and “Immigrant women” are sought following the same procedure described above. Moreover, the word migrant was used as an alternative term or synonym for each search. This was done using the Or Term option in the API, which indicates that articles including the alternative terms should be considered. The alternative terms were “Migrants”, “Migrant men”, and “Migrant women”.

We use The Global Database of Events, Language, and Tone (GDELT) project [95, 96] data set to filter out images that are not coming from media outlets. The GDELT project monitors the world’s broadcasts, collecting all online news published every 15 minutes in most countries and 100 languages. We kept only the images associated with a domain listed in the GDELT data set. We also used the GDELT data to determine the locations of domains when other approaches were not feasible. To that end, a country-level histogram for each outlet was constructed, showing which countries each source reports about in most of its articles in the GDELT dataset. We take the location with the maximum number of hits in the histogram.

Further, three approaches were used to determine if the outlet is from the country set for the search. First, we checked the TLD (top-level domain) in the URL; second, we used a database for IP geolocation to determine the location of the URL; finally, we checked the area estimated by the most prominent places mentioned in articles associated with that specific outlet in the entire GDELT. Images are discarded if none of these approaches allows us to confirm their location.

As a result of this filtering process, the average number of different media outlets was four \((M=4.03, SD=1.75),\) ranging from 1 to 10. The counts can be found in Table 11 in the Appendix. In some countries and search terms, no valid images followed the filtering criteria described. For the three search terms Immigrants, Immigrant men, and Immigrant women, 1, 2, and 3 countries were excluded respectively due to a lack of valid data.

After filtering, the total number of images was 2610, and a total of 4336 faces were extracted for the term “Immigrants”. For the gender-specific term “Immigrant men”, a total of 2084 images were downloaded, and 3034 faces were extracted, while for “immigrant women”, the numbers were 1640 and 3283, respectively. Faces are extracted using the model presented in [97]. Before detecting faces, pictures are resized to have 2048 pixels in their largest dimension. Faces are kept if the detection confidence is above 70%, and cropped faces have at least 30 pixels in the horizontal axis. After, all face images are resized to \(224\times 224.\)

Estimation of emotional information

Our approach defines countries as units of analysis, aiming to identify recurring emotional patterns across multiple media outlets. Therefore, we aggregate emotional data from all images within a country. Initially, we compute the average emotional expressions within individual images and subsequently calculate the average emotional content for each country. We evaluate the emotional content of each image based on the collective facial expressions present. To prevent bias toward images featuring multiple faces, we avoid assessing emotions on a per-person basis. Instead, we generate a single emotional measure per picture by averaging the emotions expressed across all faces within it.

We use the deep learning model introduced in [98] to estimate emotions. That model is trained to estimate valence (how positive or negative the emotional display is) and arousal (how calming or exciting the emotional display is) and to perform emotional expressions classification into eight categories (Neutral, Happy, Sad, Surprise, Fear, Disgust, Anger, Contempt).

The facial emotions in pictures are estimated as a distribution of possible emotions and a point value for valence and arousal (real numbers). As we calculate a single value per picture, an average is calculated per image over all the present faces for valence and arousal. Afterwards, an average per country is calculated, considering all the images.

Similarly, the model classifies faces into possible facial expressions, assigning a probability to each possible emotion given a face picture. Then, an average distribution over all faces is calculated per image using those distributions over emotions per face. In that way, all images have the same weight and pictures with many faces will not dominate the average distribution. Subsequently, an overall distribution per country and search term is calculated considering all the distributions per image.

For the gender-specific terms “immigrant men” and “immigrant women”, the emotions depicted in images are evaluated without consideration for the gender of the individuals portrayed. That is because the objective is to analyze emotions in images associated with these groups without focusing on specific subjects or gender expressions. However, using the method presented in [99], we estimate the gender of people in images (male or female) to determine how much they align with the gender in the search terms. The data reflects congruent results between portrayed gender and search terms. Among images associated with Immigrant men, 75% are classified as male; for Immigrant women, this proportion is 38%. For images related to Immigrants, 75% are classified as male in line with previous results [8].

We cannot conclude that the persons associated with a given gender are immigrants, nor is the case for the general term. However, that does not represent an issue for our analysis since the goal is not to determine the emotions of immigrants but the emotional information in images associated with them. In other words, We want to study the emotional characteristics of pictures linked to migration-related issues.

Indicators and selected countries

Based on the literature discussed, the indicators considered are: The Corruption Perception Index (PCI) [100], which ranks countries with scores between 0 and 100 (the higher the score, the less perceived corruption has been measured);

Gender equality index from the Global Gender Gap Report 2023 [101], which assigns a number between 0 and 1, where higher values imply more equality. GDP per capita measured in United States Dollars (USD) [102]; The GINI coefficient [103], which features a scale from 0 to 100 (higher coefficients indicate higher inequality); The proportion of refugees in the country, calculated using the population of refugees [104] and the country’s total population [105]; Population density (people per squared kilometre) [106]; Political stability [107], which considers different factors and provides estimates per country in units of standard normal distribution, ranging from approximately \(-2.5\) to 2.5. We also include the Migrant Acceptance index from the Gallup World Poll [108] which is represented in percentage (a higher percentage means more acceptance); International migrant stock (Percentage of migrant population with respect to the total population) [109]; and Unemployment rates given in percentages [110].

We considered countries ranked on the high, middle, and low scores in the CPI (perception of corruption) [100], GINI coefficient, and Acceptance index. The descriptive statistics of the data used can be found in Table 1.

Some countries had to be excluded, mainly due to the methodology proposed being unreliable because of limited internet services affecting online media presence or language-related issues, especially in countries with several official languages.

The 45 selected countries for the analysis are Argentina, Austria, Australia, Bolivia, Brazil, Canada, Chile, Colombia, Costa Rica, Czech Republic, Germany, Denmark, Dominican Republic, Ecuador, Estonia, Spain, Finland, Greece, Croatia, Hungary, Ireland, Israel, Iceland, Italy, Lithuania, Latvia, Malta, Mexico, Nicaragua, Netherlands, Norway, New Zealand, Panama, Peru, Poland, Portugal, Romania, Slovenia, Slovakia, Switzerland, Sweden, Turkiye, United Kingdom, USA, Uruguay.

Table 1 Descriptive statistics of the socioeconomic indicators data used

Explanatory variables

There are significant correlations between the selected variables, as can be seen in Table 2. Notably, there is a high correlation between CPI and GDP per capita \((r(42) = 0.78, p<0.01),\) confirming the theory previously introduced. As these two variables have been consistently described as highly intertwined, relying on theory to determine which is more relevant is not feasible. Moreover, upon assessing multicollinearity, it was found that the variables CPI and GDP per capita exhibit a Variance Inflation Factor (VIF) exceeding the threshold of 5, indicating high multicollinearity between them. A new composite variable was created to address this issue and mitigate multicollinearity effects in the regression model. We refer to this variable as “CPI + GDP”. It is defined as the sum of the standardised versions of CPI and GDP per capita. Therefore, only the variable CPI + GDP is considered, and the original ones are dropped for the primary analyses. All other indices are considered for the study after standardisation.

Finally, given that the models used in the analysis are linear, all the variables were tested for normality and homoscedasticity with Shapiro–Wilk and Breusch–Pagan tests when regressing emotional valence. Results of these tests can be found in Table 10 in the Appendix. They indicate that the assumptions are valid for all of them \((p>0.05),\) except for the Migrant population variable in the normality test \((p=0.01).\)

Table 2 Correlation between considered explanatory variables

Analysis

In previous works, it has been found that immigrants, and particularly asylum seekers, are more often depicted with negative emotions [32, 33, 111, 112]; nonetheless, the definitions of positive and negative emotions vary across studies. To mitigate this limitation, in this work, we mainly focus on the valence of the emotions, that is, on how positive or negative they are. Additionally, we explore emotion categories to identify those aligning closely with valence and demonstrating relevance in our dataset.

Given the substantial correlation among explanatory variables, we conduct two analyses: a Partial Least Squares regression (PLS) encompassing all variables and a linear regression utilizing a subset of variables. The PLS analysis is performed first with the emotional valence as the response variable. Then, a subset of transformed variables from the PLS analysis is used to predict each emotion category. The results of this analysis are used to determine the relevance of specific emotion categories and create a new target variable composed of the most relevant variables.

Utilizing the outcomes of the PLS analyses, we conduct a multiple linear regression analysis with a subset of the most relevant features. We employ multilevel and separate multiple regression analyses to discern differences between images associated with immigrant men and women.

Lastly, we perform a mediation analysis to evaluate the significance of CPI + GDP as a mediator of the relationship between GINI coefficients and emotions in the images. We use the causal mediation analysis introduced in [113, 114].

Results

PLS

Valence and emotion categories

We run a PLS analysis to address the collinearity problem and analyse the relationships between the explanatory variables and the emotional valence and emotion categories. All of the listed explanatory variables were included in this analysis, and emotional valence (Valence) was used as the response variable. We performed a grid search with a 3-fold cross-validation to evaluate performance using the \(R^{2}\) to determine the best number of components. The optimal number of components was set to 1 for the response variable valence. The regression model is statistically significant \((R^2=0.534,\) adjusted \(R^2 = 0.523, F(1, 42)=48.07,\) and \(p<0.01).\)

Then, the transformed variables were used to run independent linear regression models with each emotion category as response variables. The results are reported in Table 3. They show that Valence, Happy, and Sad are the only variables for which results are significant \((p<0.05).\)

Table 3 Results of the PLS analysis, with all the listed exploratory variables included, and different target variables

Emotional information

As we aim to represent the emotional information in pictures with a single variable, we use the results found with the PLS analysis to that end. We encountered that the socioeconomic variables can significantly predict Valence, Happy and Sad, so they can be combined into a single variable that embeds the emotional information, is conceptually meaningful, and facilitates the analysis and interpretation of the results. Therefore, we define the variable: \(\textit{Emotional information} = \textit{Valence} + \textit{Happy} - \textit{Sad}.\)

After defining the Emotional information variable, we repeated the PLS analysis with it as the response variable. As before, a single PLS component was used, and we found the regression model is statistically significant \((R^2=0.639,\) adjusted \(R^2 = 0.63, F(1, 42)=74.31,\) and \(p<0.01).\) The standardised coefficients for each of the original variables are shown in Table 4 for the general and gender-specific terms. The most relevant variables for the general term Immigrants are CPI + GDP, Political stability and Gender equality.

Table 4 Coefficients per variable from the PSL analysis using a single component and predicting the variable Emotional Information

Regression analysis

A multiple linear regression analysis was used to evaluate further the hypotheses that there is a positive relationship between CPI, GDP per capita, and the emotional information in the portrayals. In that analysis, we also included Political stability and gender equality as control variables, given their relevance based on the PLS analysis. Other variables were excluded as they were shown to be less relevant, and their inclusion might cause collinearity issues as indicated by VIF \((>5).\) We perform a regression analysis for the general term and a separate one for the gender-specific terms. For the latter, a multilevel analysis is performed first, using gender as a grouping variable.

Immigrants

The regression results are in Table 5. They were statistically significant for the dependent variable Emotional Information. Furthermore, the results show that CPI + GDP is the best predictor of emotional information in pictures and shows a positive relationship with it. Similarly, Political stability is statistically significant, implying it is an important predictor of Emotional information; The results for political stability can, to a certain extent, be expected due to the correlation of this variable with CPI. On the other hand, Gender equality does not significantly predict Emotional information.

Table 5 Results of the multiple linear regression analysis for the independent variable Emotional Information and the search term Immigrants

Gender-specific terms

A multilevel analysis is performed with a mixed linear model to evaluate the hypothesis that there are differences in the relationship between the selected socioeconomic variables and the emotional information in images depending on the gender in the search term (men or women). The results are in Table 6. Overall, the fixed effect of CPI + GDP on Emotional information is significant, confirming the hypothesis and regression analysis results for the search term Immigrants. That indicates that, on average, as CPI + GDP increases, the emotions tend to be more positive. On the other hand, the random effects show variability between genders in the search terms and the effect of CPI + GDP across the two groups.

A multilevel analysis is performed with a mixed-effects model to evaluate the hypothesis that there are differences in the relationship between the selected socioeconomic variables and the emotional information in images depending on the gender in the search term (men or women). The results are in Table 6. Overall, the fixed effect of CPI + GDP on Emotional information is significant, confirming the hypothesis and regression analysis results for the search term Immigrants. That indicates that, on average, as CPI + GDP increases, the emotions tend to be more positive. On the other hand, the random effects show variability between genders in the search terms and the effect of CPI + GDP across the two groups. In this analysis, we allowed for random intercepts and slopes for the ‘gender’ variable and CPI + GDP. For the Immigrant women, the random intercept was 0.0746, indicating that, on average, the baseline level of Emotional information for the female search term deviated by this amount from the overall population mean; similarly, the random slope was 0.032, suggesting that the effect of CPI + GDP on Emotional information also varied. For the Immigrant men, the random intercept was \(-0.0752,\) and the random slope was \(-0.032.\)

We further analyze the differences by fitting a multiple regression model for each gender-specific term. The results for “Immigrant men” and “Immigrant women” can be found in Tables 7 and 8, respectively. As for the general case, the results are statistically significant for both immigrant men \((R^2=0.311,\) adjusted \(R^2 = 0.259, F(3, 39)=5.881,\) and \(p<0.01\)) and immigrant women \((R^2=0.544,\) adjusted \(R^2 = 0.508, F(3, 40)=15.11,\) and \(p<0.01).\) Similarly, the CPI + GDP variables significantly predict Emotional information, while Political stability and Gender equality do not significantly predict the emotional information for any group. Moreover, there is a clear difference in intercepts (\(-0.149\) for Immigrant men and 0.0062 for Immigrant women) and differences in the effect of CPI + GDP variables on Emotional information, confirming distinct emotional features in the images associated with male and female immigrants. In particular, the emotions in pictures related to immigrant men are, on average, more negative, as indicated by the intercept, and they vary less with CPI and GDP. On the other hand, the emotions in images associated with women are, on average, more positive, as indicated by the intercept, and the effect of CPI + GDP is more pronounced, meaning that the higher that variable is, the more positive the emotions are.

Table 6 Results of the mixed linear model regression for the independent variable Emotional Information, accounting for gender in search terms
Table 7 Results of the multiple linear regression analysis for the independent variable Emotional Information and the search term “Immigrant men”
Table 8 Results of the multiple linear regression analysis for the independent variable Emotional Information and the search term “Immigrant women”

Mediation analysis

The reported results indicate that the CPI + GDP variable is, as expected, the only one significantly predicting the emotional information in images for the three search terms. Here, we evaluate whether the CPI + GDP variable mediates GINI coefficients and Emotional information. The results of the mediation analysis can be found in Table 9. For the general term Immigrants and Immigrant women, results show a significant mediation effect of CPI + GDP on the relationship between the GINI coefficient and emotional information in pictures, with no direct effect of the GINI coefficient. Also, the total effect is significant \((p < 0.05).\) These results suggest a mediation process in which CPI and GDP per capita mediate the influence of GINI coefficients. Further, results indicate that the effect might be a full mediation. Finally, the effect is not significant for Immigrant men.

Table 9 Results of the mediation effect analysis

The observed association between political stability and emotional information, particularly concerning the general term ‘Immigrants’ as depicted in Sect. 3.2 might indicate that political stability could be a confounding variable to control for in this mediation analysis. Political stability strongly correlates with CPI, which might explain these results. However, because of that correlation, unravelling the distinct impacts of political stability from the influence of perceptions of corruption within our dataset poses a considerable challenge. This challenge is compounded by the inherent complexity and ambiguity reported in the literature about the interaction between these variables, which leaves us lacking a clear theoretical foundation for making decisions or drawing conclusions about individual relevance in their associations. Therefore, introducing political stability as a confounding variable in our mediation analysis appears fraught with potential obstacles to the result interpretation. Its inclusion risks obstructing the clarity of our findings, as it substantially overlaps with information already encapsulated within the mediator. Consequently, the direct effect of political stability might hinder the assessment of mediation effects. While such a result might suggest that the confounder explains a significant portion of the variation observed, that conclusion could not be drawn in this case. The multicollinearity in this context, coupled with the intricate theoretical relationship between the variables, would refrain us from conclusively attributing the explanatory power solely to the confounder.

Impact of media outlets

Given that the media sources included vary per country and search term, some sources could dominate the results, and thus, biases of media outlets can influence our findings. Therefore, we have tested the hypothesis that emotional valence in all images in a single country follows the same distribution regardless of the media source they come from. To that end, we performed a Kruskal–Wallis test, which evaluates whether there are significant differences in medians among the groups. We chose this test over ANOVA, given that our data did not satisfy the assumptions of normality in many cases. The test statistics indicated no significant differences \((p>0.05)\) for most countries except for four countries for the term Immigrants, only one for Immigrant men, and none for Immigrant women. We further examined these countries to determine if media outlets influenced the distributions significantly, which might imply such outlets could be biasing the results. We performed a permutation test and a bootstrapping analysis to assess the impact of every specific media outlet on the overall data distribution compared to the combined distribution of all groups. These tests allow us to determine whether adding or removing a particular media source significantly changes the distribution. The results indicate that no single media outlet had a significant impact \((p>0.05).\)

Another way that biases of specific media outlets would affect the results is if only a few media outlets are included in a given country. We removed countries with less than three media sources to assess this and repeated the multiple regression analyses to determine their stability. The results for Immigrants are significant and in line with previous ones \((R^2=0.656,\) adjusted \(R^2=0.625, F(3,33)=21.01, p<0.01)\) with a \(\beta\) coefficient for CPI + GDP of 0.0833 \((p<0.01).\) For Immigrant women, the results are significant and consistent as well \((R^2=0.499,\) adjusted \(R^2=0.449, F(3,30)=9.967, p<0.01)\) with a \(\beta\) coefficient for CPI + GDP of 0.1641 \((p<0.01).\) However, for Immigrant men, results are not significant anymore \((R^2=0.201,\) adjusted \(R^2=0.118, F(3,29)=2.427, p=0.08)\) with a \(\beta\) coefficient for CPI + GDP of 0.037 \((p=0.356).\) These results indicate that the relationships found are unaffected by the countries with few media analyses for Immigrants and Immigrant women. Still, for Immigrant men, the relationship is not significant anymore, which further indicates that it might not be present in that case. It also represents more evidence for the hypothesised differences between the gender-specific terms, which stated that the relationship was stronger for the female term than the male one. In this case, the effect is present for the former but not the latter.

Discussion and conclusions

This study analysed emotional information in media images associated with immigrants across countries and its connection to socioeconomic factors. Here, we discuss the results following the hypotheses posed.

Perception of corruption and GDP per capita

The first hypothesis under examination suggests a positive correlation between CPI, GDP per capita, and the emotional content within immigrant-associated images. Our findings confirms this and highlight a combined variable—comprising normalised CPI and GDP per capita—as the foremost predictor of emotional content, surpassing other factors. These results suggest that as the value of this combined variable increases (indicative of lower perceived corruption and higher GDP per capita), the emotional content in images related to immigrants tends to exhibit a more positive tone.

The observed phenomenon can be related to the perception of competition for resources and inter-group threat theory [56], where out-groups are seen as threats [56, 60]. Such a perceived latent resource competition can be related to inequality, GDP per capita, as a measure of resource availability, and the perception of corruption as the expression of behaviours associated with how resources are managed and who has access to them. In more resource-abundant societies, out-groups such as immigrants are less likely to be seen as social stressors associated with threats in the competition for resources [57, 77]. In essence, higher levels of perceived corruption and fewer economic resources could lead to a higher prevalence of negative emotions in images, reflecting the perception of immigrants as both a threat and an out-group.

On the other hand, the observed effect can also be related to emotion stereotypes that undermine the perception of specific emotions. An example is the erosion of the pro-social perception of smiling in more corrupt societies [63]. From this interpretation, in societies with higher levels of corruption and less available economic resources, smiles or positive emotions in migration-related discourses in media may be deemed less acceptable, as it can foster concerns about the characteristics associated with that particular group and the consequence of their arrival.

Differences between images associated with male and female immigrants

We anticipated variations in the associations between socioeconomic variables and emotions within images linked to immigrant men and women. The findings affirm our hypothesis of a distinct relationship between CPI, GDP per capita, and image emotional content. On average, images depicting immigrant men tend to convey more negative emotions, whereas the relationship is notably stronger for immigrant women. These effects were statistically significant, in line with previous results indicating that immigrant men are more often associated with negative emotions than women regardless of the context [8, 92, 93].

These differences can be related to previous observations indicating that when discussing economic aspects, migrant men receive more attention. On the other hand, in discussions around cultural aspects, migrant women are highlighted [93]. As economic aspects are more easily connected to the perception of competition for resources, this can be why emotions in images associated with immigrant men are more negative across contexts. Conversely, the focus on cultural aspects when discourses focus on immigrant women is more likely to be connected to more positive emotions.

Mediation

The mediation analysis was performed to test the hypothesis that the CPI and GDP per capita mediate the relationship between GINI coefficients and the emotional information in images associated with immigrants. The results indicate that the mediation effect is present and significant.

While GINI coefficients did not emerge as robust emotional information predictors, results indicate the perception of corruption and GDP per capita mediates its effects. That can also be connected to perceived competition for resources. The perception of corrupt behaviours and the scarcity of resources in the presence of inequality generate a focus on specific social stressors, represented by factors such as out-groups, as threats or challenges [55, 56]. In essence, heightened inequality, entwined with perceptions of corruption and scarcity, contributes to a higher prevalence of negative emotions in images associated with immigrants.

Socioeconomic context and emotional portrayals in media

Overall, this study’s approach moves beyond examining the impact of media on society and explores the relationship between the context’s socioeconomic characteristics and the creation of visual content. We show that socioeconomic factors manifest in features like the emotions portrayed in images associated with a specific group, such as immigrants. This suggests that contextual elements, to some extent captured by socioeconomic indexes, can predict such characteristics in media content.

These results are relevant as emotions in images associated with a given group, such as immigrants, can shape and reflect discourses about them in a given society, and thus, understanding how the context shapes these discourses can inform strategies to address the potential impact they can have on immigrants and society. Nonetheless, it’s crucial to highlight that the identified relationships don’t imply causation. Further research is necessary to delve deeper into and comprehend these findings.

Limitations

This study uses specific indices measuring certain social structures, such as corruption, gender equality, and migration acceptance. Even though relevant and trustworthy sources create those indicators, the definitions used by those sources and consequent data collection are intrinsically limited because they are based on a specific idea of the issue analysed. That is, though, a general issue for all the indices. Further, the very nature of indices is to reduce the complexity of a phenomenon so that it is possible to make cross-country comparisons. However, reducing the complexity also means that several phenomena are left out [115, 116]. That also holds for the indices used in this study.

The data-gathering process had certain limitations. The number of images collected per country and the number of sources they were obtained from were restricted. On average, four sources were included for each country, and the images collected were checked to be recently published. However, it cannot be guaranteed that this sample fully represents the media in all countries.

The analyses performed here also present limitations as they are insufficient to disentangle some of the effects caused by other variables, especially those highly correlated with CPI and GDP per capita. Though the results align with theory, they cannot be consecutive about the relationships found. Further, there might be biases in the data collection related to the search engine used, the internet service in the countries studied, or the models used to extract emotional information. Disentangling all of these issues would require further investigation.