title: How to use curl get image right filename and extension
body: <p>My links just like below</p>
  <pre><code>https://cdn.sspai.com/2022/06/22/article/a88df95f3401d5b6c9d716bf31eeef33?imageView2/2/w/1120/q/90/interlace/1/ignore-error/1
  
  </code></pre>
  <p>If I use chrome to open this like and <code>cmd + s</code>
  I will get the right filename and right extension <code>png</code>.</p>
  <p>But if I use bash below, then it will no extension:</p>
  <pre><code>curl -J -O https://cdn.sspai.com/2022/06/22/article/a88df95f3401d5b6c9d716bf31eeef33?imageView2/2/w/1120/q/90/interlace/1/ignore-error/1
  
  </code></pre>
  <p>I just want to download image with right filename and extension.</p>
  <pre><code>a88df95f3401d5b6c9d716bf31eeef33.png
  </code></pre>
  <p>Same error include different image links below:</p>
  <pre><code>https://cdn.sspai.com/article/fa848601-4cdf-38b0-b020-7afd6efc4a7e.jpg?imageMogr2/auto-orient/quality/95/thumbnail/!800x400r/gravity/Center/crop/800x400/interlace/1
  
  </code></pre>