react-native-htmlview: Couldn't load large image and how do i scale it?

My HTML text has 1500x1500 image, and it couldn’t be load properly the result is the blur images.

screen shot 2017-06-27 at 3 29 16 pm ??!

Then, how do i scale and style image? I’ve tried

img: {
    	width: 100,
		height: 100,
		marginLeft: -10
  	},

But didn’t work.

About this issue

  • Original URL
  • State: open
  • Created 7 years ago
  • Reactions: 3
  • Comments: 17

Most upvoted comments

Thanks @richchurcher, that seems to work! It looks like a strange issue, in some scenarios it starts out blurry and then loads in properly, it does occur with smaller image files as well.

Thanks @RobertWSaunders that’s useful! Width and height can be passed the old fashioned way, as image attributes I believe (https://github.com/jsdf/react-native-htmlview/blob/master/htmlToElement.js#L18-L24). Try setting an explicit value there and see what happens:

<img src="" width="100" height="100">

I don’t think I can explain why the failure is intermittent though 😕