images missing - wrong base url My website occasionally loses images due to the image url being set to http://default/sites/files/XXXX.jpg. The "default" baseurl is the issue and as i understand drupal 8 has no way of setting this manually.

As this seems to happen sporadically i am assuming it is related to a cron job running under baseurl of "default" and then the page being saved to the cache.

Anyone have any ideas how to diagnose or possible causes? i was thinking something like SimpleSiteMap could be affecting this.

thanks

UPDATE
After some testing it seems likely that its a cron job accessing the pages and the image urls being cached incorrectly.

The cron jobs run under base url of 'http://default' so the chain of events seems to be:
cron starts
clears caches
a cron job attempts to render the page causing the img urls to be cache incorrecly

If i then clear the cache again and navigate to the pages the urls are re-written and cached correctly now.
Have you tried setting 

$settings['file_public_base_url'] = 'http://sitename.local/sites/default/files';

In sites/default/settings.php?

I do this for all of my sites both in dev and production and haven't had any issues.

I realise that you may have solved the issue, but just so you know you can set the base url for your files through that setting :)