Add flatten property for image spec