The image has been around for a while. Here's a Victor Davis Hanson's extremely sensitive description of it, written in 2007:
Mexifornia came out during the ultimately successful campaign to recall California governor Gray Davis in autumn 2003. A popular public gripe was that the embattled governor had appeased both employers and the more radical Hispanic politicians of the California legislature on illegal immigration. And indeed Davis had signed legislation allowing driver’s licenses for illegal aliens that both houses of state government had passed. So it was no wonder that the book sometimes found its way into both the low and high forms of the political debate. On the Internet, a close facsimile of a California driver’s license circulated, with a picture of a Mexican bandit (the gifted actor Alfonso Bedoya of The Treasure of the Sierra Madre), together with a demeaning height (5’4”), weight (“too much”), and sex (“mucho”) given. “Mexifornia” was emblazoned across the top where “California” usually is stamped on the license.I remember reading that and wondering why he was insisting on Bedoya's giftedness. Bedoya, who was actually from Mexico, plays the character referred to in the script of The Treasure of the Sierra Madre as "Gold Hat", who says " “Badges? We ain’t got no badges! We don’t need no badges! I don’t have to show you any stinking badges!”"
The flood of illegal immigrants into California has made things worse than I foresaw.
City Journal, Winter 2007
Gold Hat's men are banditos who are impersonating rurales—Mexico's corrupt, ruthless Guardia Rural . The difference is not that great, since rurales were (a) recruited from captured and conscripted bandits, and (b) might rob you anyway.
Gold Hat's point about the badges is that he has Humphrey Bogart and his friends outnumbered and outgunned, which is all that counted in rural Mexico—then and now.
But Bedoya actually was from Sonora, so playing a Mexican bandit wasn't much of a stretch. If an Anglo actor had played that role, it would have needed talent, but that would now be called "brownface".
In any event, this is an inaccurate stereotype.(Although the details on the drivers licence are still roughly accurate, if "demeaning" stereotypes.) Hispanic bandits no longer wear those hats.
This is more what they look like now: