title: Lightbox with download image button
body: <p>I'm trying to add a "download image" button to my lightbox. Therefore I'm going to add a simple button to this lightbox: <a href="http://lokeshdhakar.com/projects/lightbox2/" rel="nofollow noreferrer">http://lokeshdhakar.com/projects/lightbox2/</a></p>
  
  <p>I already tried the HTML5 download attribute but it's not suitable because it's not browser compatible.</p>
  
  <p>Right click -> "save as..." is also not a solution, because the controls of the lightbox are on top of the image.</p>
  
  <p>Is there a simple cross browser compatible solution to add a download button to the lightbox? I've also tried to use Blob or BlobBuilder but wasn't successful. Is this the right approach?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I've found a working solution here: <a href="https://stackoverflow.com/a/833024/1301058">https://stackoverflow.com/a/833024/1301058</a></p>
  
  <pre><code>&lt;FilesMatch "\.jpg$"&gt;
  &lt;IfModule mod_headers.c&gt;
  Header set Content-Disposition "attachment"
  # for older browsers
  Header set Content-Type "application/octet-stream"
  &lt;/IfModule&gt;
  &lt;/FilesMatch&gt;
  </code></pre>
  
  <p>But the problem is, that all images are transferred with MIME type application/octet-stream and I receive warnings for that.</p>
  
  <p>How can I set the mimetype on click? I tried to add a parameter to the file path and the FilesMatch regex like:</p>
  
  <pre><code>&lt;FilesMatch "\.jpg\?1$"&gt;
  </code></pre>
  
  <p>But that doesn't work. </p>