title: Removing mime type icon from image using CSS, possible?
body: <p>I'm currently using some CSS to append font-awesome icons as mime types for uploaded files and or links that end in .pdf, .xls, .docx, etc.</p>
  
  <p>I should have prefaced this entire post with this comment I made:</p>
  
  <p><strong>Ok, I should have mentioned that this is a WordPress site where users are able to upload and link images via the Media Uploader. Trying to automate this process so that (once delivered) the editor won't have to add HTML code to the visual editor. That being said, all WP images have a class assigned to them that's ".wp-image-*", would it be possible to use that WP class to filter the icons?</strong></p>
  
  <p>My CSS looks like this:</p>
  
  <pre><code>a[href$=".pdf"]::after {
    font-family: "fontawesome";
    content: "\0020\f1c1";
    color: inherit;
    font-weight: 400
  }
  </code></pre>
  
  <p>This solution works exactly as I want it to with one exception... it appends the mime type icon to <strong>images that LINK to</strong> a .pdf not just text links.</p>
  
  <p>How to remove or not display the font-awesome icon on images only? That is the question. I have tried a number of different CSS solutions and have come up with either removing the entire image that is linked to the .pdf, or nothing at all.</p>
  
  <p>Looking for some guidance here, would prefer the solution to be CSS <strong>but am open to whatever will work the best</strong>(php, js, jquery, etc).</p>
  
  <p>HERES AN EXAMPLE:</p>
  
  <p>(text link)</p>
  
  <pre><code>&lt;a href="example.pdf"&gt;Example PDF&lt;/a&gt;
  </code></pre>
  
  <p>This works as expected.</p>
  
  <p>This is the problem...</p>
  
  <p>(image link below)</p>
  
  <pre><code> &lt;a href="example.pdf"&gt;
     &lt;img src="example.jpg" alt="example pdf" /&gt;
   &lt;/a&gt;
  </code></pre>
  
  <p>When the link wraps an image, it appends the font awesome icon to the image. How to stop the font awesome icon on images wrapped in links only?</p>
  
  <p>My page code looks like this (not verbatim), also, using BootStrap Library:</p>
  
  <pre><code>&lt;div class="container"&gt;
    &lt;div id="main_content"&gt;
       &lt;!-- Then there are the usual basic tags found in WordPress content such as &lt;p&gt;&lt;h1&gt;&lt;blockquote&gt; etc but the containing div is "main_content", no &lt;div&gt;'s before image --&gt;
      &lt;p&gt;
        &lt;a href="http://example-document.pdf"&gt;
         &lt;img class="alignright size-medium wp-image-639 img-responsive" src="http://example-image.jpg" alt="Alt Title" srcset="http://example-image.jpg 232w, http://example-image.jpg 613w" sizes="(max-width: 232px) 100vw, 232px"&gt;
        &lt;/a&gt;
      &lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>