title: How to get original image size by using Glide on Android?
body: <p>I am loading images from dynamic sources and loading them in my app. However sometimes the images are so small and looks bad in my app. What I want to do is get image size and if it is smaller than 5x5, don't show the ImageView at all. </p>
  
  <p>How to achieve this?</p>
  
  <p>When I use sizeReadyCallback, it returns the size of ImageView instead of image. When I use request listener it returns 0,0.</p>
  
  <pre><code>Glide.with(getContext()).load(imageUrl).listener(new RequestListener&lt;String, GlideDrawable&gt;() {
          @Override
          public boolean onException(Exception e, String model, Target&lt;GlideDrawable&gt; target, boolean isFirstResource) {
              return false;
          }
  
          @Override
          public boolean onResourceReady(GlideDrawable resource, String model, Target&lt;GlideDrawable&gt; target, boolean isFromMemoryCache, boolean isFirstResource) {
              //This returns 0,0
              Log.e("TAG","_width: " + resource.getBounds().width() + " _height:" +resource.getBounds().height());
              return false;
          }
      }).into(ivImage).getSize(new SizeReadyCallback() {
          @Override
          public void onSizeReady(int width, int height) {
              //This returns size of imageview.
              Log.e("TAG","width: " + width + " height: " + height);
          }
      });
  </code></pre>