[PATCH 17/26 v7] spl: Extract legacy image handling into separate file