title: Universal Image Loader and 302 redirects
body: <p>Using UIL version 1.8.0 to load a twitter profile image url:
  <a href="http://api.twitter.com/1/users/profile_image/smashingmag.jpg?size=bigger" rel="nofollow">http://api.twitter.com/1/users/profile_image/smashingmag.jpg?size=bigger</a></p>
  
  <p>with disc and memory cache. The images are failing to load and storing the html that comes along with the 302 redirect in the disc cache file. The images never load or decode successfully (the onLoadingFailed method of my SimpleImageLoadingListener gets called for every twitter profile image url). Can anyone load a simple twitter image url with UIL? </p>
  
  <p>Here is the content of my cache file for that url:</p>
  
  <p>cat /mnt/sdcard/MyCache/CacheDir/1183818163</p>
  
  <pre><code>&lt;html&gt;&lt;body&gt;You are being &lt;a href="https://si0.twimg.com/profile_images/3056708597/6438618743e2b2d7d663fd43412bdae8_bigger.png"&gt;redirected&lt;/a&gt;.&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Here is my configuration:</p>
  
  <pre><code>File cacheDir = StorageUtils.getOwnCacheDirectory(FrequencyApplication.getContext(), "MyCache/CacheDir");
  
  DisplayImageOptions defaultOptions = new DisplayImageOptions.Builder()
      .cacheInMemory()
      .cacheOnDisc()
      .imageScaleType(ImageScaleType.IN_SAMPLE_POWER_OF_2)
      .build();
  
  ImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(FrequencyApplication.getContext())
      .memoryCacheExtraOptions(480, 800)
      .threadPoolSize(20)
      .threadPriority(Thread.MIN_PRIORITY)
      .offOutOfMemoryHandling()
      .memoryCache(new UsingFreqLimitedMemoryCache(2 * 1024 * 1024))
      .discCache(new TotalSizeLimitedDiscCache(cacheDir, 30 * 1024 * 1024))
      .discCacheFileNameGenerator(new HashCodeFileNameGenerator())
      .imageDownloader(new BaseImageDownloader(MyApplication.getContext(), 20 * 1000, 30 * 1000))
      .tasksProcessingOrder(QueueProcessingType.FIFO)
      .defaultDisplayImageOptions(defaultOptions)
      .build();
  ImageLoader.getInstance().init(config);
  </code></pre>