title: How to Compress and reduce Quality of image using Glide for android
body: <p>I'm using Glide library to upload images.  In another app, I use this code</p>
  <pre><code>void imageButtonclick() {
          iv1.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  CropImage.activity(filePath).setGuidelines(CropImageView.Guidelines.ON)
                      .setAspectRatio(1,1).setOutputCompressQuality(50).start(UploadBook.this);
  
                  // Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                      //intent.putExtra(MediaStore.EXTRA_OUTPUT,imageuri);
                      //startActivityForResult(intent, CAMERA_REQUEST_CODE);
              }
          });
  </code></pre>
  <p>to decrease the size of the image by declaring <code>.setOutputCompressQuality(50)</code> But I don't know how to do the same with the Glide Image library.</p>
  <p>My code is</p>
  <pre><code>public static void loadLocalImage(Context ctx, RequestOptions glideRequests, Uri uri, ImageView imageView,
                                        RequestListener listener) {
  
          glideRequests.fitCenter()
                  .skipMemoryCache(true)
                  .diskCacheStrategy(DiskCacheStrategy.NONE);
          Glide.with(ctx)
                  .applyDefaultRequestOptions(glideRequests.placeholder(R.drawable.ic_stub).error(R.drawable.ic_stub))
                  .asBitmap()
                  .load(uri)
                  .listener(listener)
                  .into(imageView);
  
      }
  </code></pre>