ImageOptimize not using image url specified in my multi-environment setup and my volume config
You need to re-index your assets to show the correct URL after changes to your volume location when using imageOptimize. Just re-save the volume from within Craft CMS. Even if you have made amends to your volume config file you will need to re-save from within Craft CMS.

To quote Andrew, the plugin author...


  "So I want to say that this is normal (though maybe not desirable?)l.
  The URLs in the OptimizedImages fields get resolved at asset save
  time. So the full absolute URL to each image will resolve to whatever
  the alias is.
  
  Potentially this resolution could be postponed until runtime, but in
  the interim, if you re-index your assets on the environment."