MLA format
Ansel Adams. Barn Fence, Cape Cod. 1939
For artwork viewed in the museum, cite the artist's name, the title of the photograph, italicized; the date of composition and the institution and the city in which the artwork is located:
Adams, Anselm. Barn Fence, Cape Cod. 1939, Museum of Modern Art, New York.
Add the name of the website to the same artwork found online:
Adams, Anselm. Barn Fence, Cape Cod. 1939. MOMA, www.moma.org/collections/works/44469
More information from MLA Style Center on how to cite photographs viewed in person vs online and how to cite images located in books.