Hello, We have an endpoint /customer/image.jpg that returns:
{
base64Image: "data:image/jspeg;base64jgsjdhgfsjdhgfjshd"
}
We want to load this encoded image using coil ->> AsyncImage method. We have long list of data. Is it correct implementation from backed team that returns base64 json data that need to be parse first then load into Image composable. Do we any other optimal solution using compose or native framework?
p
Pablichjenkov
03/01/2025, 10:17 PM
Normally you send just the image url. Then in the backend you have an Image server dedicated only to serve images. Images don't have to be base64 encoded. Just pass the image url directly to coil AsyncImage
👍 3
💯 1
g
gildor
03/03/2025, 6:28 AM
http response technically not limited (in a realistic way)
gildor
03/03/2025, 6:28 AM
but returning base64 is for sure less than optimal