Comments (4)
I've had the same issue on IOS.
I manage to fix it by using the renderImage prop, and render my own image component. @Yandamuri
from react-native-image-viewer.
@iMonk777 Able to render image , but it's size is very small as shown below,
And this is how I rendered
return (
<View style={{flex: 1}}>
<ImageViewer
imageUrls={images}
renderImage={() => <Image style={{height: '100%', width: '100%'}} resizeMode={'contain'} source={{uri:`${axios.defaults.baseURL}${url}`, headers}} />}
enableImageZoom={true}
backgroundColor={TEXT_HEADERBLACK}
maxOverflow={0}
renderIndicator={() => <></>}
/>
</View>
);
What changes should I do to make image fit to the screen?
from react-native-image-viewer.
Tried the same code as yours @Yandamuri , And it works for me. It is probably related to your image resolution? Maybe try a bigger resolution image from google, just for testing.
Also, if you have an array of images, the URL for each image can be taken from the source, like below
renderImage={({ source }) => (
<Image
source={source} //here my source is an object {uri: 'my image link'}
style={styles.image}
/>
)}
from react-native-image-viewer.
@iMonk777 I have tried multiple hd images like 750 × 1334 But still result is same. Strange thing is Images are rendering as expected in android. Problem is with iOS only. Tried in both Simulator and real device. But result is same.
Did you try in iOS?
Any guess that why it is not working in iOS?
from react-native-image-viewer.
Related Issues (20)
- Very large images will appear blurry on Android HOT 2
- 无法滑动图片,滑动事件老是触发点击事件 HOT 1
- remote SVG image can't be rendered? HOT 7
- 安卓有时候无法全屏
- When closed it is instant. Is there a way to fix this?
- Vertical swap
- 我这样加载怎么是黑屏,加载示例的图片没问题
- Image cannot be loaded when opened first time HOT 3
- ERROR Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method. in ImageViewer HOT 2
- Feature request: swipe up to close HOT 1
- Image is rendered only when opened second time in android
- flickering when zoom HOT 2
- Dynamic change array of images HOT 2
- Restrict Loop on swipe HOT 1
- Can not show image slide like package with error no suitable image URL loader found for (null)
- There should be a feature,if i touch outside the image or touch the blur area on screen, there is a event call
- Help with renderHeader/Footer props not showing anything HOT 1
- Add close button in Modal? HOT 1
- 设置pageAnimateTime 无效
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-image-viewer.