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.

Image not showing inside the col

See original GitHub issue
<Grid>
            <Col> <Image source={{uri: Image_Http_URL}} /> </Col>
            <Col><Text>B</Text></Col>
            <Col><Text>B</Text></Col>
            <Col><Text>B</Text></Col>
        </Grid>

Image not showing inside column

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
akhil-gacommented, Sep 5, 2018

@kingkarki try setting some height and width for the image or set the flex to 1.

Code

import React, { Component } from 'react';
import { Container, Header, Text } from 'native-base';
import { Image } from "react-native";
import { Col, Grid } from 'react-native-easy-grid';

export default class App extends Component {
  render() {
    return (
      <Container>
        <Header />
        <Grid>
          <Col><Image style={{ flex: 1 }} source={{ uri: 'https://facebook.github.io/react-native/docs/assets/favicon.png' }} resizeMode="contain" /></Col>
          <Col style={{ backgroundColor: "red" }}><Text>B</Text></Col>
          <Col style={{ backgroundColor: "blue" }}><Text>C</Text></Col>
          <Col style={{ backgroundColor: "green" }}><Text>D</Text></Col>
        </Grid>
      </Container>
    );
  }
}

Screenshot

simulator screen shot - iphone 6 - 2018-09-05 at 13 44 27

0reactions
SupriyaKalghatgicommented, Mar 12, 2019

Closing issue due to no response

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using col with text and an image is not working - Stack Overflow
Try using display: inline in the CSS of both the divs that are col-8 and col-4 .
Read more >
Why is my image not staying in its column? - Treehouse
I'm not sure if this is your actual issue, as I don't have the image file you're using, but adjusting max-width: in your...
Read more >
The Picture element - HTML: HyperText Markup Language
The HTML element contains zero or more elements and one element to offer alternative versions of an image for different display/device ...
Read more >
Images - Bootstrap
Documentation and examples for opting images into responsive behavior (so they never become larger than their parent elements) and add lightweight styles to ......
Read more >
Picture perfect images with the modern <img> element
Hovering over an image in the Chrome DevTools Elements panel will display the dimensions of the image as well as the image's intrinsic...
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