title: How to download images without displaying them using Vue.js?
body: <p>In my Vue.js app, I'd like force browser to download image <em>without displaying it</em> when a button is clicked.</p>
  
  <p>Following <a href="https://stackoverflow.com/a/11090338/517235">this</a> answer, I came up with this solution:</p>
  
  <pre><code>&lt;span @click="downloadImg(remoteURL)"&gt;
          Download Image                  
  &lt;/span&gt;
  </code></pre>
  
  <p>And the method:</p>
  
  <pre><code>downloadImg(url) {
      console.log('downloading', url); 
      document.execCommand('SaveAs',true, url);
      },
  </code></pre>
  
  <p><code>remoteURL</code> is in fact a small function which generates url like this:</p>
  
  <pre><code>  remoteURL(link) {        
         return this.BASE_URL+ link  //link is the image's path fetched from database
    },
  </code></pre>
  
  <p>But when I click <code>Download Image</code> nothing happens.</p>
  
  <p><a href="https://stackoverflow.com/questions/17311645/download-image-with-javascript/28890083#28890083">This question</a> is not relevant because I don't want to just <code>Download image with JavaScript</code>. What I want is to download image <em>quietly</em>, that is without displaying the image.</p>
  
  <p>How can I fix it? </p>