Coil gives error while loading multiple image in parallel in jetpack compose

I'm us jetpack compose in my project and coil to show the images. I have almost ten icons retrieved from the server and want to show them using coil since they are URL addresses. So I wrote this code:

for (item in equipments.indices) {

                    modifier = Modifier.size(25.dp),
                    model = ImageRequest.Builder(LocalContext.current)
                    contentDescription = equipments[item].title,
                    onState = {
                        Log.i("Log", "Equipments: state is $it")


But when I looked at the log, I realized the coil was throwing the error:

state is Error(painter=null, result=coil.request.ErrorResult@89c09f28)

I realized the is also the same problem when not to use jetpack compose. And it is because of multiple threading. It was indicated to refer to the context to solve the problem. Like this, while using coil in main activity:


So I also tried to add LocalContext.current, but still the problem exists. How can I solve that?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum