-
-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some image sizes not working #37
Comments
I don't know if this is a related issue but all youtube embedded videos also spill off the screen. Oh and I'm currently using 3.5.0-rc.3 of react-native-render-html |
Hi @chadmorrow, thanks for the kind words ! As documented in the README :
In your example with the ghost comic, you do have It resizes properly as long as I remove them I'm not sure what's the best in your situation, because I guess you can't make sure these attributes aren't in your HTML. Well, you could use Regarding your other issue, at the moment, there is no behavior regarding It would be nice to add a fallback depending on the width of the screen instead of a static value. |
Oh, the iframe issue might just be a misunderstanding on my part. I thought I had read on a different issue that had been closed that there was support added for iframes similar to images but now I don't see where I would have read that. Thanks for looking into the issue with the images. I can't quite figure out why the height and width attributes are always set to 1 on some of these problem images and it doesn't seem to matter what I try to override them to, they always render full size. I'll keep working on it though and let you know if I figure anything out. Thank you again for taking the time to look into this! |
When I request the image of your example it's actually a 1x1 image, so your issue must come from your feed. I'll think about improving the |
I improved the Feel free to re open another issue if your image rendering problem actually comes from this plugin. |
The image size issue is still a problem for me as well. It seems like this did not get resolved |
@Stevevelt
Try adding ignoredStyles |
First of all, thank you for this repo, it is by far the best html renderer for React Native that I've tried.
The problem I'm having is that not all images are being sized correctly. I'm using the
Dimensions.get('window').width
trick but some images are rendered at full size and spill off the screen. I'm not sure exactly what the cause is but it seems to only apply to images who have their sizes specified in this format:sizes: "(max-width: 100px) 100vw, 603px"
I'm building a rss feed reader using the Feedly API so I've been noting which feeds give me problems with their images and they all have that sizing format in common. Some examples of the feeds that do this:
https://postsecret.com/
https://waitbutwhy.com/
http://www.poorlydrawnlines.com/
Here's a screencap of the debug output when the screen is rendered:
And the html I'm rendering look like this:
I'm sure I didn't do a great job explaining all this but I'm happy to provide any additional information needed to figure this out.
The text was updated successfully, but these errors were encountered: