FILE - This April 26, 2012, file photo shows the Shutterfly headquarters in Redwood City, Calif. Private equity firm Apollo Global Management is buying online photo publishing company Shutterfly for $51 per share. Redwood City, California-based Shutterfly's stock closed at $50.25 on Monday, June 10, 2019. (AP Photo/Paul Sakuma, File)

FILE - This April 26, 2012, file photo shows the Shutterfly headquarters in Redwood City, Calif. Private equity firm Apollo Global Management is buying online photo publishing company Shutterfly for $51 per share. Redwood City, California-based Shutterfly's stock closed at $50.25 on Monday, June 10, 2019. (AP Photo/Paul Sakuma, File)

SAN FRANCISCO (AP) — Private equity firm Apollo Global Management is buying online photo publishing company Shutterfly for $51 per share.

Apollo will pay $1.74 billion for the 20-year-old company, which became popular offering its users prints and photobooks of their favorite shots. But demand for that type of service has declined as people opt to share photos online through Facebook and other social networks.

Redwood City, California-based Shutterfly’s stock closed at $50.25 on Monday — and was trading as high as $94.28 per share a year ago.

Ryan O’Hara, the former CEO at real estate company Move Inc., will become Shutterfly’s new chief executive.

ADVERTISEMENT

Shutterfly became popular during a time when printing photos meant a trip to the supermarket and often a dayslong wait. The company’s popularity swelled by selling an array of photo-clad gifts including mugs, calendars and canvasses.

Shutterfly bought competitor’s Kodak’s online photo business for $23.8 million in 2012 after the legacy photo company filed for bankruptcy protection earlier that year.

But as digital photo sharing became more pervasive, Shutterfly’s popularity waned, even as revenue grew. Shutterfly announced it would lay off about 260 employees, or 13% of its staff, in early 2017.

Shutterfly bought school photography company Lifetouch for $825 million last year.

Apollo will also buy photo printing company Snapfish and merge it with Shutterfly.

Apollo has bought more than 150 companies, including security company ADT, entertainment restaurant Chuck E. Cheese’s and telecom firm Charter Communications.