title: Does Glide have a method for loading both PNG and SVG?
body: <p>I'm using <a href="https://github.com/bumptech/glide" rel="noreferrer">Glide</a> to load some images <strong>asynchronously</strong> into some of my <code>ImageView</code>s, and I know it can handle images like <code>PNG</code> or <code>JPG</code> as it can handle <code>SVG</code>. </p>
  
  <p>Thing is, As far as I know, the way I load those two kinds of image differs. Like:</p>
  
  <p><strong>Loading "normal" images</strong></p>
  
  <pre><code>Glide.with(mContext)
                  .load("URL")
                  .into(cardHolder.iv_card);
  </code></pre>
  
  <p><strong>Loading SVG</strong></p>
  
  <pre><code>GenericRequestBuilder&lt;Uri, InputStream, SVG, PictureDrawable&gt; requestBuilder = Glide.with(mContext)
          .using(Glide.buildStreamModelLoader(Uri.class, mContext), InputStream.class)
          .from(Uri.class)
          .as(SVG.class)
          .transcode(new SvgDrawableTranscoder(), PictureDrawable.class)
          .sourceEncoder(new StreamEncoder())
          .cacheDecoder(new FileToStreamDecoder&lt;&gt;(new SVGDecoder()))
          .decoder(new SVGDecoder())
          .listener(new SvgSoftwareLayerSetter&lt;Uri&gt;());
  
  requestBuilder
          .diskCacheStrategy(DiskCacheStrategy.NONE)
          .load(Uri.parse("URL"))
          .into(cardHolder.iv_card);
  </code></pre>
  
  <p>And if I try to load SVG with the first method it won't work. If I try to load PNG or JPG with the second method, it won't work either.</p>
  
  <p><strong>Is there a generic way to load both image types using Glide?</strong> </p>
  
  <p>The server where I'm fetching those images from don't tell me the image type before I download it. It's a REST server and the resource will be retrieved in a way like <code>"http://foo.bar/resource"</code>. The only way to know the image type is reading the HEAD response.</p>