question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Images loaded with coil don't show when using transformations

See original GitHub issue
  • Markwon version: 4.4.0

When using the coil plugin and applying transformations as explained in the documentation images are not displayed (only the placeholder appears) when returning to a previously displayed TextView with markdown.

It doesn’t seem to matter which transformations you use and how many. Removing the transformations makes the issue go away.

Markwon configuration:

Markwon.builder(activity)
    .usePlugin(
        CoilImagesPlugin.create(
            object : CoilImagesPlugin.CoilStore {
                override fun load(drawable: AsyncDrawable): LoadRequest {
                    return LoadRequest.Builder(context)
                        .transformations(
                            RoundedCornersWithoutCropTransformation(14f)
                        )
                        .data(drawable.destination)
                        .placeholder(R.drawable.image_placeholder)
                        .build()
                }

                override fun cancel(disposable: RequestDisposable) {
                    disposable.dispose()
                }   
            },
            ImageLoader.Builder(activity)
                .okHttpClient(okHttpClient)
                .placeholder(R.drawable.image_placeholder)
                .build()
        )
    )
    .build()

Steps to reproduce:

  1. Open a fragment with a TextView that is populated using Markwon with some markdown containing images.
  2. Put the app to background.
  3. Reopen the app from recents.
  4. Observe: the images are not displayed anymore (only placeholders are shown). If an image didn’t load in step 2 (e.g. you advanced too quickly or the loading failed) it will load now (if not blocked by some external factors), but also just once.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
notiescommented, Aug 14, 2020

Fixed in 4.5.1

1reaction
notiescommented, Aug 10, 2020

4.5.1-SNAPSHOT with the fix is available right now 😉 . Can you please check if it works for you? If it does a minor stable release can be done in the nearest future

Read more comments on GitHub >

github_iconTop Results From Across the Web

Coil don't load image in emulator with Jetpack Compose
I need to show an image in my app by url using Coil, but this image don't load. I follow the official documentation ......
Read more >
Image Processing with Coil in Android - Section.io
This tutorial will guide you on how to process images in Android using a fast, lightweight, and powerful open-source library known as Coil....
Read more >
Jetpack Compose: Image loading using Coil | Geek Culture
Loading images from the Coil library which automatically handling the network request as well as image caching.
Read more >
Transformations - Coil
Transformations allow you to modify the pixel data of an image before the Drawable is returned from the request. By default, Coil comes...
Read more >
Understanding modern image loading on Android ... - YouTube
Uncoiling the Coil : Understanding modern image loading on Android with Sagar Viradiya. Watch later. Share. Copy link.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found