title: How to cache images in Glide
body: <p>When I use glide, some images doesn't loads. How can I store it in the cache, or anywhere, to when I'll use the app all my images loads.
  Example picture of my problem:</p>
  
  <p><img src="https://i.stack.imgur.com/59WU9.jpg" alt="screenshot"></p>
  
  <p>My code:</p>
  
  <p>.java</p>
  
  <pre><code>             home_ib7_monster_truck = 
              (ImageButton)findViewById(R.id.home_ib7_monster_truck);
               Glide.with(Home.this)
              .load(R.drawable.moviep_monster_truck)
              .centerCrop()
              .fitCenter()
              .diskCacheStrategy(DiskCacheStrategy.ALL)
              .into(home_ib7_monster_truck);
  </code></pre>
  
  <p>.xml</p>
  
  <pre><code>&lt;ImageButton
              android:id="@+id/home_ib7_monster_truck"
              android:layout_width="98dp"
              android:layout_height="155dp"
              android:layout_alignStart="@+id/home_ib4_keplers_dream"
              android:layout_below="@+id/home_ib4_keplers_dream"
              android:layout_marginTop="14dp"
              android:background="@android:color/transparent"
              android:scaleType="fitCenter" /&gt;
  </code></pre>
  
  <p>I use glide 'cause I saw it's easy to use, and I can load images from drawables.
  And the main problem is, that it do this randomly, so I mean once all my images are doesn't seems, another time all images can see, and I don't know why.
  I use 980x1550 sized images, 'casuse I don't want my images beign full of pixels, and when I use another method like src in the .xml I got memory error.
  So anyone know any soluton, how can I cache the images?</p>
  
  <p><em>EDIT:</em>
  With these (.diskCacheStrategy(DiskCacheStrategy.RESULT ;  diskCacheStrategy(DiskCacheStrategy.Source) I have the same problem.
  I get this from LogCat: Throwing OutOfMemoryError "Failed to allocate a 1519012 byte allocation with 230112 free bytes and 224KB until OOM"
  and i don't know how, when it should be cached.</p>