After reinstalling wordpress images do not appear in posts?

I am assuming you used the WordPress Importer? Did you select the “Import images” option? I think this would solve your issue.

To clarify on the issue: Your images were not imported in the wp_posts database. They are stored in there as an “attachment” post type. The WP Gallery Shortcode references the id of each of those entries to build the gallery. Your media library also displays the images based upon the database. WordPress doesn’t just detect images in the uploads folder