title: Loading local drawables with Coil Compose
body: <p>I recently <a href="https://coil-kt.github.io/coil/compose/#migrating-from-accompanist" rel="nofollow noreferrer">migrated from Accompanist's <code>ImagePainter</code> to Coil's</a>, below is the pertinent code after my updates.</p>
  <pre class="lang-kotlin prettyprint-override"><code>val painter = rememberImagePainter(DRAWABLE_RESOURCE_ID)
  
  when (painter.state) {
      is ImagePainter.State.Empty -&gt; Timber.w(&quot;Empty&quot;)
      is ImagePainter.State.Loading -&gt; {
          Box(
              contentAlignment = Alignment.Center,
              modifier = Modifier.wrapContentSize()
          ) {
              CircularProgressIndicator()
          }
      }
      is ImagePainter.State.Success -&gt; {
          Image(
              painter = painter,
              contentDescription = null,
              contentScale = ContentScale.Fit,
              modifier = Modifier
                  .padding(8.dp)
                  .size(84.dp)
                  .clip(RoundedCornerShape(corner = CornerSize(16.dp)))
          )
      }
      is ImagePainter.State.Error -&gt; Timber.e(&quot;Error&quot;)
  }
  
  </code></pre>
  <p>Now those images don't render and <code>painter.state</code> is always <a href="https://coil-kt.github.io/coil/api/coil-compose-base/coil.compose/-image-painter/-state/index.html#-1837310909%2FClasslikes%2F-1061370309" rel="nofollow noreferrer">Empty</a>. My legacy Accompanist implementation displayed images by this point in the code. It also works if I use the stock <code>painterResource(resId)</code> from Compose.</p>
  <p>What am I missing to execute Coil's new <code>painter</code> through its states?</p>