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.

ImagesPlugin class is missing

See original GitHub issue

I’m trying to implement images in my markdown view but it seems that the ImagesPlugin.create() is missing.

image

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
notiescommented, Mar 24, 2021

Hello @chrisbarth01 ,

you can use special ImageSizeResolver that explicitly makes all images fit the width of the screen. How to use custom ImageSizeResolver is shown in this sample. Then you can apply 100% as width dimension, for example:

class FitWidthImageSizeResolver : ImageSizeResolverDef() {
  override fun resolveImageSize(drawable: AsyncDrawable): Rect {
    return resolveImageSize(
      ImageSize(
        ImageSize.Dimension(100F, UNIT_PERCENT),
        null
      ),
      drawable.result.bounds,
      drawable.lastKnownCanvasWidth,
      drawable.lastKnowTextSize
    )
  }
}
1reaction
notiescommented, Mar 12, 2021

Hello @chrisbarth01 ,

there is a problem with the GIF that you had shared - gifer.com responds with content-type: text/plain. markwon-image relies on proper content type in order to trigger specific MediaDecoder. In this case response is decoded as a regular image (as a fallback strategy) and thus is not animated. You can try other image loaders or provide ImagesPlugin with a custom defaultMediaDecoder which handles such a case:

final Markwon markwon = Markwon.builder(context)
  .usePlugin(ImagesPlugin.create(plugin -> {
    plugin.defaultMediaDecoder(new MyGifAwareDefaultMediaDecoder());
  }))
  .build();

Other available image loaders that have GIF support are:

Read more comments on GitHub >

github_iconTop Results From Across the Web

single-image-gallery class is missing on new pages
Since the latest Jetpack plugin I created one new page and I see an unexpected behavior on single images with a link to...
Read more >
Maven plugin: Skipped dependency module missing ... - GitHub
Expected behavior: Images are functional, i.e. include all dependencies (even if they were marked to "skip" for Jib). Steps to reproduce:.
Read more >
Missing plugins menu item - Usage & Issues - Image.sc Forum
I have an ImageJ update site called quantixed which puts a folder in Fiji.app/plugins. It contains a few macros that normally appear under...
Read more >
A required class was missing while executing org.apache ...
Does the class org.apache.maven.shared.filtering. ... that was missing, to the maven-war-plugin (not sure what version was using by default, ...
Read more >
Template Matching and Slice Alignment--- ImageJ Plugins
PIV(Particle Image Velocimetry), Traction force microscopy, Template matching ... I got a error message saying "Plugin or class not found:"Align_slices"
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