Napoleon was a very controversial figure at the time of his death. A large percentage of French were monarchists and pro-Bourbons. Many others were Republicans or Socialists who were against personal dictatorships.
Instead, in the days of the Great War, he was widely seen as a French national hero, and now that perception is almost unanimous. When and how did this change in public opinion happen?