title: How to download an image with different sizes in jquery?
body: <p>I want to create buttons such that each button downloads an image in the page with different sizes . Here is my image: </p>
  
  <pre><code>&lt;img src="src" alt="no image" id="QRImage" /&gt;
  </code></pre>
  
  <p>And these are my buttons :</p>
  
  <pre><code>  &lt;a onclick="Download(1)" href="javascript:;" &gt;
    &lt;i class="fa fa-download"&gt;&lt;/i&gt; Little
    &lt;/a&gt;  &amp;nbsp;&amp;nbsp;
    &lt;a onclick="Download(2)" href="javascript:;" &gt;
    &lt;i class="fa fa-download"&gt;&lt;/i&gt; Medium
    &lt;/a&gt;  &amp;nbsp;&amp;nbsp;
    &lt;a onclick="Download(3)" href="javascript:;"&gt;
    &lt;i class="fa fa-download"&gt;&lt;/i&gt; Large
    &lt;/a&gt; 
  </code></pre>
  
  <p>All i want to do is write a function that takes parameter and download the image according to this parameter without changing the image which is shown in the html. Thanks a lot for any help.</p>