Use Mysql to link images to posts into multisite

Hello,

I am migrating a site from SPIP to a Wordpress multisite network. with 3 subsites. I managed to export/import authors, categories, posts, comments in the right subsite, but would like to know how to link images to sites in a consistent way.

Thanks.
Youri.