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.

Images in Android and IOS are different

See original GitHub issue

Decision Table

  • My issue does not look like “The HTML attribute ‘xxx’ is ignored” (unless we claim support for it)
  • My issue does not look like “The HTML element <yyy> is not rendered”

Good Faith Declaration

Description

What I did: I want to render a list of images.

const test =
    '<img src="https://s3-ap-southeast-1.amazonaws.com/investingnote-production-webbucket/attachments/4fc238a6d2deea2a3279ad62b038ca77e44869f3.jpg?1645015785">' +
    '<br><img src="https://s3-ap-southeast-1.amazonaws.com/investingnote-production-webbucket/attachments/177cf251f7d8b241792f246b3d829405bc488c9c.jpg?1645015791">' +
    '<br><img src="https://s3-ap-southeast-1.amazonaws.com/investingnote-production-webbucket/attachments/f0a321517c9248e1adc84c46541ca2b9c93ade51.jpg?1645015796">';
    
  const source = {
    html: test,
  };
  
  <RenderHtml source={source} />

What I expected to happen: I expect the images to show in width 100%.

What actually happened: But in IOS, it shows correctly but in Android, it does not show in width 100%.

Can someone help me?

I have also tried tagsStyle and customRenderer and set width:100% but android still showing the same.

React Native Information

System:
    OS: macOS 12.2
    CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
    Memory: 534.34 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.5 - /usr/local/bin/node
    Yarn: 1.22.11 - /usr/local/bin/yarn
    npm: 7.21.1 - /usr/local/bin/npm
    Watchman: 2021.09.06.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /Users/gary/.rbenv/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK:
      API Levels: 28, 29, 30, 31
      Build Tools: 28.0.3, 29.0.2, 30.0.2, 30.0.3
      System Images: android-30 | Google APIs Intel x86 Atom, android-31 | Google Play Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_292 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: ^17.0.2 => 17.0.2 
    react-native: ^0.65.1 => 0.65.1

RNRH Version

react-native-render-html@6.3.4

Tested Platforms

  • Android
  • iOS
  • Web
  • MacOS
  • Windows

Reproduction Platforms

  • Android
  • iOS
  • Web
  • MacOS
  • Windows

Minimal, Reproducible Example

IOS Image

Android Image

Additional Notes

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
jsamrcommented, Feb 17, 2022

@GaryOoi OK; I’ll try to reproduce when I manage to find a time window; not to be expected too soon, unfortunately!

0reactions
jsamrcommented, Mar 5, 2022

@GaryOoi I forgot to mention that a public invite is available in the README! Here you go: https://discord.gg/dbEMMJM

Read more comments on GitHub >

github_iconTop Results From Across the Web

This image looks very different on Apple devices — see for ...
This image appears starkly different when viewed in Apple iOS and Mac devices as opposed to others. BleepingComputer explains why.
Read more >
uploaded images from iOS and android are different
The app sends a image (jpeg in this case) from the gallery or camera to a server using a multipart upload.
Read more >
Android vs iOS - Difference and Comparison - Diffen
Google's Android and Apple's iOS are operating systems used primarily in mobile technology, ... OneDrive, Amazon Photos and Dropbox are other alternatives.
Read more >
Photos look different on iPhone vs Android and PC, seems ...
Photos on Xiaomi MI6 looks almost the same except that smartphone's display is more contrast. But colors are the same. But On iPhone...
Read more >
6454 Android Ios Images, Stock Photos & Vectors - Shutterstock
Find Android Ios stock images in HD and millions of other royalty-free stock photos, illustrations and vectors in the Shutterstock collection.
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