compose-richtext icon indicating copy to clipboard operation
compose-richtext copied to clipboard

About support .svg or other format picture (like .gif)

Open equationl opened this issue 11 months ago • 1 comments

In my project, I need to show .svg picture.

I can easy to edit like this to support:

Edit .\richtext-commonmark\src\androidMain\kotlin\com\halilibo\richtext\markdown\RemoteImage.kt :

val painter = rememberAsyncImagePainter(
  model = ImageRequest.Builder(LocalContext.current)
    .data(data = url)
    .size(Size.ORIGINAL)
    .crossfade(true)
    .build(),
  imageLoader = ImageLoader.Builder(LocalContext.current)
    .components {
      add(SvgDecoder.Factory())
    }
    .build()
)

I can using same way to show .gif, But it just for me.

Is there a way to make this library support optional? Cause not everyone need this.

equationl avatar Jul 21 '23 02:07 equationl