title: How to display the variant of an image with Active Storage in a JS box?
body: <p>In my view, I can display my file attached to the model with Active Storage in a popup like this:</p>
  
  <pre><code>&lt;a href="&lt;%= rails_blob_path(@image.file, disposition: 'inline') %&gt;" rel="example_group"&gt;&lt;%= image_tag @image.variant('small') %&gt;&lt;/a&gt;
  </code></pre>
  
  <p>It's working well.</p>
  
  <p><a href="https://i.stack.imgur.com/MTNdr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MTNdr.png" alt="enter image description here"></a></p>
  
  <p>The problem is when I want to use a variant in the link:</p>
  
  <pre><code>&lt;a href="&lt;%= url_for(@image.variant('high')) %&gt;" rel="example_group"&gt;&lt;%= image_tag @image.variant('small') %&gt;&lt;/a&gt;
  </code></pre>
  
  <p>The variant code used is:</p>
  
  <pre><code>file.variant(resize:size).processed.service_url
  </code></pre>
  
  <p>The link seems to be good, but when I click the image, the image is not opened in my JS popup as before but opened in a new browser window. This is very strange. </p>
  
  <p>I shortened the link.</p>
  
  <pre><code>https://bucket.s3.eu-west-3.amazonaws.com/variants/MmsLY3rf8yR9/38a77a69d170464c472f6d36fb3fbc28b284af0cadaa533?response-content-disposition=inline%3B%20filename%3D%22chateau.jpeg%22%3B%20filename%2A%3DUTF-8%27%27chateau-lynch.jpeg&amp;response-content-type=image%2Fjpeg&amp;Signature=29fe7d85fe369ea2335fa8b333d4868d8c2f2c22e1efe
  </code></pre>
  
  <p>Is-it a "content-disposition" issue ?</p>