In this paper, we study how to optimize image transmission time in peer-to-peer networks by considering the property of bitstreams generated by image coding algorithms. Images can be either scalable coded or nonscalable coded. Since transmission of nonscalable coded images is well understood, we focus on the transmission of scalable coded images in this paper.Because scalable coding embeds lower bit-rate bitstreams into higher bit-rate bitstreams, there exists a many-to-one relationship between supplying and requesting peers. When a requesting peer asks for an image coded in a particular bit rate, multiple peers with the same image but coded in different bit rates can supply to the requesting peer. This enables us to assign the task of image transmission to multiple supplying peers, split the traffic among these peers, and then reduce overall transmission time. Therefore, when we transmit scalable coded images over peer-to-peer networks, it is important to design optimal peer assignment algorithms to minimize the overall transmission time for the requesting peer.In this paper, we first formally define the peer assignment problem and then establish a sufficient condition on the optimality of peer assignment. Based on this condition, we propose an optimal peer assignment algorithm in continuous space (OPA-CS) and then derive a suboptimal peer assignment algorithm in integer space (SOPA-IS). Finally, we carry out extensive experiments to verify the superior performance of the proposed peer assignment algorithms by comparing with two simple heuristic schemes.