We present a method for incorporating image-charge effects into the description of charge transport through molecular devices. A simple model allows us to calculate the adjustment of the transport levels, due to the polarization of the electrodes as charge is added to and removed from the molecule. For this, we use the charge distributions of the molecule between two metal electrodes in several charge states, rather than in gas phase, as obtained from a density-functional theory-based transport code. This enables us to efficiently model level shifts and gap renormalization caused by image-charge effects, which are essential for understanding molecular transport experiments. We apply the method to benzene di-amine molecules and compare our results with the standard approach based on gas phase charges. Finally, we give a detailed account of the application of our approach to porphyrin-derivative devices recently studied experimentally by Perrin et al. [Nat. Nanotechnol. 8, 282 (2013)], which demonstrates the importance of accounting for image-charge effects when modeling transport through molecular junctions.