In 1839, Philadelphia photographer Robert Cornelius was probably the first to do something that has become a national pastime: take a selfie. The technology has changed a lot since then, as illustrated by “Eye to I: Self-Portraits From 1900 to Today.” The attitudes have changed even more.

“Eye to I” is the final exhibition of the ones mounted to mark the National Portrait Gallery’s 50th anniversary. Most of the previous exhibitions have featured people who aren’t usually noticed by official portrait galleries: slaves, workers, lynching victims and even those literally invisible to history — represented by the images in another 50th-anniversary show, “UnSeen: Our Past in a New Light.”

This show is more traditional, in the sense that many of its subjects are well known and, in some cases, expected. (How could there not be, for example, an Andy Warhol?) Yet some of the 77 artworks, nearly all of them from the museum’s collection, are of less-celebrated figures. The selections are noteworthy for their artfulness, but also for how they illustrate our shifting ideas of self-image.

The exhibition is arranged in a rough chronology, so the first half is all paintings, drawings, prints and photographs. These include self-renderings of American realist Edward Hopper and Mexican muralist Diego Rivera and a partial view — austerely formalist, of course — of geometric abstractionist Josef Albers. There are also pre-digital selfies of such documentary photographers as Walker Evans, Berenice Abbott and Edward Steichen, as well as artier ones such as Man Ray.

A few earlier pieces illustrate themes more common in the later works. The country’s first female photojournalist, Jessie Tarbox Beals, stands with her gear in 1904. Her woman-at-work pose presages the emergence of women in fields that, back then, were mostly off-limits. In a heroic portrait, Thomas Hart Benton strikes a pose that may have been inspired by actor Douglas Fairbanks. The picture was made around 1924, well before most artists — and everyone else — started thinking of themselves as the stars of their own biopics.

The recent works include videos and other pieces impossible without contemporary technology. Evan Roth’s “Internet Cache Portrait” reveals the artist himself not as a physical being but as collection of interests, gathered from his computer and printed on a long roll of thin vinyl. It’s another way of depicting presence in absence, and more cutting-edge than Jim Dine’s “Bathrobe,” which implies the existence of the artist’s omitted body.

Enrique Chagoya’s “Aliens Sans Frontiers” is a lithograph, which is not a new process, but it relies on a recently devised procedure: DNA testing. Inspired by a reading of his genome, the artist depicts six versions of himself, each in a stereotypical setting associated with one of his ancestors’s homelands.

The closest thing to a smartphone selfie is Molly Soda’s video of herself as she interacts with her phone. She’s not quite her current self, though. Molly Soda is a semi-fictionalized version of 29-year-old artist Amalia Soto as a teenager, buffeted by the emotional and technological stimuli delivered by texts and apps. If Benton imagined himself as a Hollywood swashbuckler, Soto is living a different sort of movie — one she describes as “kind of sad or dark.”

The darkness is palpable in the last gallery. As much as it chronicles changing technology and ideas of self-image, “Eye to I” illustrates candor about decline and death.

That’s implicit in Chuck Close’s large 1989 portrait, composed of 16 close-up photos and made the year after a serious injury left him a quadriplegic. Bodily imperfection is depicted more bluntly in Alice Neel’s nude of herself, painted between the ages of 75 and 80. It announces her acceptance of aging while critiquing the female form as male artists’s domain.

Patricia Cronin’s bronze sculpture of herself and her spouse, Deborah Kass, is both traditional and contemporary. The original is meant for the couple’s gravesite and is modeled after Victorian-era funerary art. But it depicts the women in nude embrace, sensuous and seemingly very much alive.

Bronze outlasts flesh, but the goal of any portrait is to preserve. The body withers while the image endures — if properly backed up on a flash drive, of course.

If you go

Eye to I:
Self-Portraits from 1900 to Today

National Portrait Gallery, Eighth and F streets NW.

Dates: Through Aug. 18.

Admission: Free.