SAN FRANCISCO — Behind the billions of images posted on Pinterest and Instagram, there's money to be made.