title: Flask-Admin: displaying images from S3
body: <p>I created a custom <code>ImageUploadField</code> in Flask-Admin for uploading images to S3. It's working great, except when I select a single record - the <code>img src</code> tag now prepends <code>/static/</code> to all of my file routes and I can't see the image. This is the generated tag from Flask-Admin:</p>
  
  <pre><code>&lt;div class="image-thumbnail"&gt; &lt;img src="/static/https://mybucket.s3.amazonaws.com/mypicture.jpg"&gt; &lt;/div&gt;&lt;input class="form-control" id="image1" name="image1" type="file"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I also serve static files from my app, so globally changing the <code>static</code> directory wouldn't be a good idea.</p>
  
  <p>There appears to be several properties on <code>ImageUploadField</code> that can be modified for this need (<code>endpoint</code>, <code>url_relative_path</code>, <code>relative_path</code> and <code>base_path</code>) but I was still unable to fix it.</p>