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.

Displays images with incorrect aspect ratio: <p><img..../></p>

See original GitHub issue

I have a problem when I want render data from API by html resource Example data <p> demo data </p><img src='https:/abc.com/up/image1.jpg'.. /><p><img src='https:/abc.com/up/image2.jpg'.. /> </p>

Image 1: working fine Image 2: not working fine because inline paragraph tag. display with incorrect height item

Please help me solve this problem! Thank you!

screen shot 2018-10-29 at 09 41 38 am

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

7reactions
herelcommented, Mar 7, 2019

I have this problem !

<p class="xxxxxx"><img src="...."></p> => <Text><Image source="" /></Text>

It seems that the problem comes with the attributes of TEXT for example the line heigth margin or padding

resolve

I solved it by eliminating the

inside the image.

so react compile:

stringHtml.replace(/<\s*(p+).*?>/g,'<$1>').replace(/<(\/)?p>/g , '')

2reactions
nongh4704commented, Jan 26, 2019

I hava the same issue in android.Have you solved it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Displays images with incorrect aspect ratio
Learn how to display responsive images with the correct aspect ratio. ... There are two common causes for an incorrect image aspect ratio:....
Read more >
Fix The Visuals That Have Incorrect Aspect Ratio - Screpy
Changing the aspect ratio of the image you use may cause the image to become poor quality, which negatively affects the user experience,...
Read more >
How To: Convert a PowerPoint Presentation from 4:3 ratio to ...
Here's the trick. Right click on an image and select Size and Position. From this dialog, click in the Height box. Now, just...
Read more >
Logo image displaying at incorrect aspect ratio?
Here is the Lighthouse report: Displays images with incorrect aspect ratio Image display dimensions should match natural aspect ratio.
Read more >
Gravatar displayed using incorrect aspect ratio - WordPress.org
[This thread is closed.] When analysing pages using Google Lighthouse, the Best Practices section lists wpDiscuz avatars under “Displays images…
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