title: Placeholder Photo Not Appearing on Null URL in Search - Android, Kotlin, Glide
body: <p>I'm using Glide in an Android, Kotlin, Jetpack project.  When the photos are loading, the <code>DEFAULT_MOVIE_IMAGE</code> appears.  However if one of the movies that is returned has a <code>null</code> value for an image URL, no image appears and the card shrinks down to the size of only the title.  I'm trying to set it so the <code>DEFAULT_MOVIE_IMAGE</code> will appear if there is a <code>null</code> value for the movie poster url.</p>
  <p>Setting a placeholder or an error image does not appear to be working.</p>
  <p>Image part of the MovieCard composable</p>
  <pre><code>movie.posterPath?.let { url -&gt;
              val image = loadPicture(url = url, defaultImage = DEFAULT_MOVIE_IMAGE).value
              image?.let { img -&gt;
                  Image(
                      bitmap = img.asImageBitmap(),
                      contentDescription = &quot;Movie Projector&quot;,
                      modifier = Modifier
                          .fillMaxWidth()
                          .height(450.dp),
                      contentScale = ContentScale.Fit
                  )
              }
  </code></pre>
  <p>ImageUtils.kt</p>
  <pre><code>    const val DEFAULT_MOVIE_IMAGE = R.drawable.movie_placeholder
      const val POSTER_BASE_URL = &quot;https://image.tmdb.org/t/p/w500&quot;
  
  @Composable
  fun loadPicture(
      url: String,
      @DrawableRes defaultImage: Int
  ): MutableState&lt;Bitmap?&gt; {
  
      val bitmapState: MutableState&lt;Bitmap?&gt; = remember { mutableStateOf(null) }
  
      Glide.with(LocalContext.current)
          .asBitmap()
          .load(defaultImage)
          .into(object : CustomTarget&lt;Bitmap&gt;() {
              override fun onResourceReady(resource: Bitmap, transition: Transition&lt;in Bitmap&gt;?) {
                  bitmapState.value = resource
              }
  
              override fun onLoadCleared(placeholder: Drawable?) {
              }
  
          })
  
      Glide.with(LocalContext.current)
          .asBitmap()
          .load(&quot;https://image.tmdb.org/t/p/w500$url&quot;)
          .error(R.drawable.space_dog_laika1)
          .into(object : CustomTarget&lt;Bitmap&gt;() {
              override fun onResourceReady(resource: Bitmap, transition: Transition&lt;in Bitmap&gt;?) {
                  bitmapState.value = resource
              }
  
              override fun onLoadCleared(placeholder: Drawable?) {
              }
  
          })
  
      return bitmapState
  }
  </code></pre>