Migrate images formats part 1: make compilable