Intensity interferometry (II) exploits the second-order correlation to acquire the spatial frequency information of an object, which has been used to observe distant stars since 1950s. However, due to unreliability of employed imaging reconstruction algorithms, II can only image simple and sparse objects such as double stars. We here develop a method that overcomes this unreliability problem and enables imaging complex objects by combing II and a ptychography iterative algorithm. Different from previous ptychography iterative-type algorithms that work only for diffractive objects using coherence light sources, our method obtains the objects spatial spectrum from the second-order correlation of intensity fluctuation by using an incoherent source, which therefore largely simplifies the imaging process. Furthermore, by introducing loose supports in the ptychography algorithm, a high-quality image can be recovered without knowing the precise size and position of the scanning illumination, which is a strong requirement for traditional ptychography iterative algorithm.