Image hosting is relatively cheap, so you can have good margins if you can get a lot of use and fill the ad inventory. The way you do it, is by running as thin of an operation as possible.
When the first wave of one-click image hosts were popping up back in 2004-2005 roughly, I noticed one called ImageVenue. The founder, Vlad, was out of Eastern Europe somewhere. I emailed him and bought advertising, the price was right and he had a lot of impressions to fill. Back then he was just buying tons of $40/month dedicated servers from one specific host, using a img7.imagevenue.com scheme for each machine, and filling up the boxes. You can still use ImageVenue.com 17 years later, even though the traffic for the service has never been what it was during the early peak years (tons of image hosting competition swamped the market). I had a running dialogue with Vlad across about a year, he also mentioned in discussing Ajax (early popularity days for Ajax) use at the time, that he wasn't familiar with it and was "only really good with C++ and PHP". So I assume some of it was built in PHP. He was managing ads in-house, where he handled each sale by email, negotiating impressions and duration each month.
And regarding TwitPic, circa 2010: "TwitPic is generating $1.5 to $2 million in ad sales on an annual basis, with 70% profit margins, says its founder Noah Everett"