<p>Good lord, this is embarrassing. For some reason I had a static URL in the asset source configuration.</p>

<p><strong>EDIT:</strong> To provide at least a little value to others finding this: If you configure your asset sources, make sure the not use full URLs in the URL field.<br>
So, instead of <code>https://example.com/images/</code> use <code>/images</code>.</p>

CC BY-SA 3.0
2017-10-20T07:27:59.170Z
2017-10-21T09:58:48.467Z
2017-10-21T09:58:48.467Z
Moritz Friedrich
<p>I've just changed my local development environment from using <code>.local</code> domains to <code>.localhost</code> (no more DNS trouble on MacOS, yay!).<br>
So I set Crafts <code>siteUrl</code> to <code>.localhost</code>, and while Craft serves pages that link correctly, my images still point to the old URLs. How's that and what to do now?  </p>

<p>Images are mostly served like this:</p>

<pre><code>&lt;picture class="site-logo"&gt;
  &lt;source
    srcset="{{ branding.logo.first().url('small') }}"
    media="(min-width: 100px)"
  &gt;
  &lt;img src="{{ branding.logo.first().url('large') }}" alt="{{ siteName }}"&gt;
&lt;/picture&gt;
</code></pre>

<assets><url><image>
Assets have old URL
# Assets have old URL

(Asked by: username_0 on 2017-10-20)

I've just changed my local development environment from using .local domains to .localhost (no more DNS trouble on MacOS, yay!).
So I set Crafts siteUrl to .localhost, and while Craft serves pages that link correctly, my images still point to the old URLs. How's that and what to do now?  
Images are mostly served like this:

**Tags:** assets, url, image

---

## 1 answers

### Answer by username_0 on 2017-10-20. Score: 1

Good lord, this is embarrassing. For some reason I had a static URL in the asset source configuration.

**EDIT:** To provide at least a little value to others finding this: If you configure your asset sources, make sure the not use full URLs in the URL field.  
So, instead of `https://example.com/images/` use `/images`.


---

