Coder Social home page Coder Social logo

ansh-099 / react-native-grid-image-viewer Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 19.0 1.56 MB

A grid display for multiple images which you can view on clicking in fullscreen mode and swipe through.

Home Page: https://www.npmjs.com/package/react-native-grid-image-viewer

License: MIT License

JavaScript 44.79% Starlark 7.93% Java 25.69% Ruby 3.30% Objective-C 18.29%

react-native-grid-image-viewer's Introduction

image

๐Ÿ‘‹ Hey there!! Github Profile !

I'm Anshul Singh and welcome to my brief intro...

  • ๐Ÿ‘จโ€๐Ÿ’ป I'm an undergraduate majoring in Computer Engineering From NSIT, Delhi
  • ๐Ÿ“ฑ A Native Mobile App Developer
  • โšก Deep Learning
  • ๐ŸŒ Want to know me more? Checkout my products ICOS Rentals | ConnectMany | Foodpilu | Dr Kanwar Deep

Linkedin

Anshul's github stats

Top Langs

Visitor Count

image

react-native-grid-image-viewer's People

Contributors

ansh-099 avatar imoris11 avatar netdown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-grid-image-viewer's Issues

How ca we add Headers?

Hello, This package is great! But is there any way to pass headers when accessing an image? I have a protected endpoint to avoid unauthorized users accessing images.

Repo still active to review PR ?

Hey @ansh-099, (the discussion tab is not active, so I'm opening a issue)
It seems the repo hasn't moved much in the last year.

I need to change some features/functions of this component to make it more configurable (without breaking everything),
If I make a PR, will it be reviewed or not?

Thank you.

Images inside the scrollview not rendering

Upon tapping the item in the list , modal to show enlarged image opens but only renders one of the given images not all. It is totally random it sometimes renders first image or sometimes render last image, rest aren't rendered properly or not at all.

Loading local images

Hi! I'm building an image gallery with Expo and found your package to be extremely helpful. One thing I realized was that loading locally-available images was kinda tricky, given that the package loads images with source={{ uri: item.image }}. I thought about making a PR with the proposed solution for this.

I tried forking and testing a change locally but I keep getting errors with the npm installation (expo cant find the package). I tried installing it locally by cloning and doing npm install --save ../react-native-grid-image-viewer. I also tried using npm link but same result.

Given this, I have two questions:

In essence, the change would be adding the parameter localImage to the data field, so the new interface would allow for something like this:

...
  <GridImageView data={[{ image: 'https://imgur.com/asdasd' }, { localImage: './assets/myfile.png' }]} />
...

In the meantime I will be using this workaround to grab the image URI, but well, it would be cool to help you out and offer a new interface ๐Ÿ˜€

infinity scroll

how can i implement infinity scroll on this library ?

Thank you

How can I customize the rendering of image items ?

I'm currently using the 'react-native-grid-image-viewer' in my React Native project, and it's working great. However, I would like to customize the way image items are rendered within the grid. I want to add some additional styling, such as border radius.

Remove '.image' from remaining Image source uri values

Thank you for addressing my last request! That approach definitely helps my use case and it's simpler than the change I made in my previous PR.

But I am noticing that the remaining Images inside /components/GridImageViewer.js still need to be updated. The images aren't rendering bc of this. Removing the .image at lines 132, 156, and 180 fixes this, since data now represents an array of urls already.

Thanks again!

Problems to open image full screen mode.

Im trying to use this code to load my pictures in the grid:

useEffect(() => {
    const currentDiary = diaryData[diaryIndex];
    const reformPictures = [];
    if (currentDiary.pictures && currentDiary.pictures.length > 0) {
      currentDiary.pictures.forEach(pic => {
        reformPictures.push({
          name: `http://localhost:3000/${pic.name}`,
          type: pic.type,
        });
      });
      setPictures(reformPictures);
    }
  }, [diaryData, diaryIndex]);


 const renderPicture = item => {
    return (
      <ProfileView>
        <ProfileImage
          width={windowWidth}
          height={windowHeight}
          source={{uri: item.name}}
        />
      </ProfileView>
    );
  };

// render page
 <Container>
        <GridImageView
          data={pictures}
          renderGridImage={item => {
            return renderPicture(item);
          }}
        />
 </Container>

Pictures are load succesfully on the grid. But when i click over to open full screen viewer, the image dosent load.

How can I add dynamic array inside the data prop?

Hey, the grid image viewer is really awesome, great work, I could not find anything on stack overflow therefore I opened a issue here. I just wanted to know if there is a way I can do this:

data={mappedArrayOfImageUris}

instead of:

data={[{ image: 'url' }, { image: 'url' }, { image: 'url' }, { image: 'url' }]}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.