dev-yakuza / react-native-image-modal

the simple image modal for React Native
https://dev-yakuza.github.io/en/react-native/react-native-image-modal/
MIT License
551 stars 46 forks source link

Image is blurred when styled with width 0 and height 0 #276

Closed NhatBNPiconTech closed 5 months ago

NhatBNPiconTech commented 5 months ago

when styling with style={{ width: 0, height: 0 }} The first time I open it, the image will be blurry. The second time I open it, it will display normally. Please help me. @dev-yakuza

Simulator Screenshot - iPhone 15 Pro - 2024-06-12 at 15 40 57

dev-yakuza commented 5 months ago

@NhatBNPiconTech

  1. is it on Android or iOS?
  2. Could you share the code?
  3. Could you share the image?
NhatBNPiconTech commented 5 months ago

@dev-yakuza

  1. i have problem on ios device
  2. I want to hide images with a link. After clicking the link, the image modal will appear, so I did it the following way Screenshot 2024-06-12 at 16 04 45

    Screenshot 2024-06-12 at 16 01
44

dev-yakuza commented 5 months ago

@NhatBNPiconTech So, Did you set { width: 0, height: 0 } to style={style} in <ImageModal />?

I think you should correct image size to the width and height. I think you can use the Image.getSize.

Could you check the following link and try to use Image.getSize and set the real size of the image to the style?

dev-yakuza commented 5 months ago

There is no response, so I close the issue.

If you have any problem, please reopen or make a new issue.

Thanks.