How do I loop/iterate through posts to edit all img tags?

You can loop through all your posts and use regex to replace that string. The quick and dirty version would be to just put this in a page template, assign it to a page and then visit said page. If you want something a little cleaner then modify this code to work with something like WP Utility Script Runner.

$posts_to_clean = get_posts(array(
    'posts_per_page' => -1,
));
echo 'Posts to clean: ' . count($posts_to_clean) . '<br>';
foreach ($posts_to_clean as $dirty_post) {
    $dirty_post->post_content = preg_replace('`(data-src)`', 'src', $dirty_post->post_content);
    $updated = wp_update_post($dirty_post, true);
    if (!is_wp_error($updated)) {
        echo 'Updated post ' . $updated . '<br>';
    } else {
        echo 'Unable to update post ' . $dirty_post->ID . '<br>';
    }
}
echo 'Complete!'