Answers.Body: <p>Have a look at the settings of your asset's volume:</p>
  <p>Go to: Settings &gt; Assets &gt; [Your Volume Name here]</p>
  <p>Check the field &quot;Base URL&quot;. If it starts with the alias <code>@web</code>, remove it.</p>
  <p>E.g. &quot;<code>@web/images</code>&quot; -&gt; &quot;<code>/images</code>&quot;.</p>
  <p>Now check the URL of your image again.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-10T18:18:23.057Z
Answers.LastActivityDate: 2021-02-10T18:18:23.057Z
Answers.UserDisplayName: Matthias Redl-Mann
Body: <p>I'm using image transforms and <code>getUrl()</code> method to display an image.</p>
  <p>I'm using Blitz to export my site as a static website.</p>
  <p>My problem is that .html pages get cached with images that have full urls like this: <code>http://localhost:8888/assets/pages/_medium/image.jpg</code></p>
  <p>There must be an obvious solution that i'm missing... I've tried getPath but it doesn't support image transforms. Removing <code>http://localhost:8888</code> should do the job.. but how?</p>
  
Tags: <assets><url><plugin-blitz>
Title: Get image asset relative url
ThreadText: # Get image asset relative url
  
  (Asked by: username_0 on 2021-02-09)
  
  I'm using image transforms and `getUrl()` method to display an image.
  
  I'm using Blitz to export my site as a static website.
  
  My problem is that .html pages get cached with images that have full urls like this: `http://localhost:8888/assets/pages/_medium/image.jpg`
  
  There must be an obvious solution that i'm missing... I've tried getPath but it doesn't support image transforms. Removing `http://localhost:8888` should do the job.. but how?
  
  **Tags:** assets, url, plugin-blitz
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-02-10. Score: 1
  
  Have a look at the settings of your asset's volume:
  
  Go to: Settings > Assets > [Your Volume Name here]
  
  Check the field "Base URL". If it starts with the alias `@web`, remove it.
  
  E.g. "`@web/images`" -> "`/images`".
  
  Now check the URL of your image again.
  
  
  ---
  
  