How to load image through byte array using Glide?
You can convert Base64
String to image using the following
Glide.with(context)
.load(Base64.decode(base64ImageString, Base64.DEFAULT))
.asBitmap()
.placeholder(R.drawable.ic_broken)
.into(rowImageView);
Lets say your base64 string is
String imageBytes = "HVao14fpmtHSev3OgsrQNsawkFzXNcY3BsfQla6..."
You should convert imageBytes
String to array of bytes through
byte[] imageByteArray = Base64.decode(imageBytes, Base64.DEFAULT);
afterwards pass this imageByteArray
to Glide.
Glide.with(context)
.load(imageByteArray)
.asBitmap()
.placeholder(R.drawable.ic_broken)
.into(rowImageView);