title: Rewrite img src url's on localhost, Wordpress and Custom Fields
body: <p>I am trying to load images through custom fields, rather than using the featured image. </p>
  
  <p>My custom fields are as follows</p>
  
  <pre><code>name:  image-small
  value: /images/thumbs/small/example.jpg
  </code></pre>
  
  <p>PHP</p>
  
  <pre><code>&lt;img src='&lt;?php echo get_post_meta($post-&gt;ID, 'image-small', true); ?&gt;'&gt;
  </code></pre>
  
  <p>yet instead of writing the img src as </p>
  
  <pre><code>http://localhost/project.co.uk/images/thumbs/small/example.jpg
  </code></pre>
  
  <p>it displays </p>
  
  <pre><code>http://localhost/images/thumbs/small/example.jpg
  </code></pre>
  
  <p>is there a way to either write the htaccess so that it re-routes the url or, do I have to hardcode it into the HTML until I go live, then replace the code with whats above? Or is there a much easier way to do it? </p>
  
  <p>I have found</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/9601637/relative-paths-to-image-file-in-wordpress-3-3-1-custom-fields">relative paths to image file in wordpress (3.3.1) custom fields?</a></li>
  </ul>
  
  <p>but it didn't help me resolve it.</p>