title: Use an SVG image with non `.svg` extension in <img> tag
body: <p>I'm trying to display an SVG in an <code>&lt;img&gt;</code> tag, but the SVG files don't have the <code>.svg</code> extension.</p>
  
  <p>So a few things, </p>
  
  <ol>
  <li>The file extension is not .svg, but the content within the file <strong>IS</strong> svg.</li>
  <li>I need to use the <code>&lt;img&gt;</code> tag because it's important that I ignore the width and height in the SVG file (if any) and instead use the ones defined in my HTML/CSS. <strong>I cannot edit the contents of the SVG file, these are randomly uploaded and I don't want to be modifying them each time they are uploaded.</strong></li>
  <li>I can use PHP to read the data from the SVG, but it still needs to be displayed in the <code>&lt;img&gt;</code> tag.</li>
  </ol>
  
  <p>Currently, when I try to use the SVG that has SVG content but no SVG file extension, it will act as though it couldn't load the image. </p>
  
  <p>However, if I visit that same URL in my web browser, it will display the SVG fine regardless of the fact that it doesn't have a <code>.svg</code> extension.</p>
  
  <pre><code>&lt;img src="https://di.community/uploads/monthly_2019_02/D-00023_svg.614976c7cefbcc2e89ab406b11f87800" /&gt;
  </code></pre>
  
  <p>How would I get the SVGs to display properly while still using the <code>&lt;img&gt;</code> tag to determine width/height, without modifying the SVG file and without an <code>.svg</code> extension.</p>
  
  <p>I've tried the following, but the width/height is still used from the SVG and not the ones i define in HTML/CSS.</p>
  
  <pre><code>    &lt;span style='display: inline-block; margin: 0px; width: 35px !important; height: 35px !important;'&gt;
          &lt;?php echo file_get_contents('https://di.community/uploads/monthly_2019_02/D-00023_svg.614976c7cefbcc2e89ab406b11f87800'); ?&gt;
      &lt;/span&gt;
  </code></pre>