2

My android app shows images which is downloaded from AWS S3. For now I download the images to the local storage, and show images from the downloaded images. But, it would be annoying from the user's perspective.

How can I display image from AWS S3 without downloading into the local storage. It would be great if I can display images not with the file but with image url.

It might be possible by set the files on ASW S3 to public, which I want to avoid for security issues.

JH Sean Kang
  • 87
  • 2
  • 14

1 Answers1

3

Firstly generate pre-signed AWS S3 URL and then load image using Glide. Below are steps:

  1. How to generate pre-signed AWS S3 bucket URL check here

  2. Load image using Glide:

    Glide.with(getActivity().getBaseContext()).load("IMAGE URL FROM S3").centerCrop().into(imageView);
    
Vikasdeep Singh
  • 20,983
  • 15
  • 78
  • 104