Questions tagged [react-image]

React Image is a reactjs component that facilitates loader and fallback lifecycles

62 questions
1
vote
1 answer

I want to put the images in an object or array and use them when I need them. What should I do?

I wish I could bring all the images to the 'Image.jsx' file and easily take them out of another file in React For example export const Header = ({ title, children }) => { return ( <> {title}
eeez kim
  • 175
  • 1
  • 3
  • 15
1
vote
2 answers

iOS rotate photo issue

I have setup a PWA with React (CRA). When I upload a picture in iOS and crop it using react-image-crop it displays the cropped image sideways, it works well on all other devices (desktop, android). I saw some similar issues open, but I can't really…
A.Blanc
  • 403
  • 1
  • 6
  • 15
1
vote
1 answer

How to get React Native image failure error code

If loading the image fails then onError method is called. However it does not tell us the reason why it failed. Is there a way I could find out why RN could not load the image? Was it because of 404 or 500 or a user was not connected to the…
Yahoo
  • 4,093
  • 17
  • 59
  • 85
1
vote
1 answer

React-images gallery

I am trying to build an image gallery with React-images(https://github.com/jossmac/react-images). Here is my code so far. https://codesandbox.io/s/gallant-yalow-7srs6 Here I am trying to achieve two things: Implement the modal and the modal will…
Max
  • 25
  • 1
  • 8
1
vote
1 answer

I want to add a "download button on modal carousel using react-images, the button should be available on modal popup

can i add a button as a parameter to the carousel,i tried all possible ways to add a button to this

Using with a Lightbox component

{viewerIsOpen ? ( …
Tej
  • 59
  • 1
  • 8
1
vote
1 answer

Make a proper onClickThumbnail for Lightbox react-images

So I'm setting up a Lightbox component with the react-images library and seem to have everything working. Except for one thing. I have the thumbnails rendering but I can't create a proper onClick function. This is because I don't know how to get…
Adam LaMorre
  • 655
  • 7
  • 21
1
vote
1 answer

Image load in react

I am uploading less code because I think it is enoug Ask if need more to find error async componentDidMount(){ var image = this.props.data.img console.log(this.props.data.img == './../images/thumbnails/g.png') //…
Rajan Lagah
  • 2,373
  • 1
  • 24
  • 40
1
vote
0 answers

images getting rotated in react app

This is my code import React from "react"; import { Grid, Header } from "semantic-ui-react"; import Gallery from "react-photo-gallery"; import Lightbox from "react-images"; import _1 from "../images/pics/2.jpg"; import _2 from…
1
vote
1 answer

How to pass prop for an image stored locally in react-native

I tried to pass a prop for the 'require' in IMAGE tag of the react-native component. But, it shows an error "Server code Error 500". The same if I pass a link using URI it works with the props. Working :
Amirth
  • 143
  • 1
  • 1
  • 7
1
vote
2 answers

React-native, how to resize the image based on the original size of image?

I have list of images to be displayed, wherein size of the image is unknown, how can I display the image fully without any transparent spaces in top and bottom of the image? (I tried getting image size from getSize method, which is eventually giving…
senthil balaji
  • 588
  • 4
  • 18
1
vote
1 answer

react web image @2x append issue

class ProductComponent extends Component { render() { var url = 'http://via.placeholder.com/150x150'; return (
Binit Ghetiya
  • 1,919
  • 2
  • 21
  • 31
1
vote
1 answer

Unable to show image from Redux state in ReactNative

My Reducer: const initialState = { 1: { id: '1', name: 'AryaStark', theimage: "https://upload.wikimedia.org/wikipedia/en/3/39/Arya_Stark-Maisie_Williams.jpg" }, 2: { id: '2', name: 'SansaStark', theimage:…
Somename
  • 3,376
  • 16
  • 42
  • 84
0
votes
0 answers

Using react-image-crop cropping the zoom in image

I am using react-image-crop for cropping the image and I have implemented the zoom on the image. now I want to crop the Zooomed in image but when I try to crop the image it crops the original image, not the zoomed-in image. any help would be…
0
votes
1 answer

Django+DjangoRestFramework+React(TS): React-Image component showing my images' size as 1295x0

In Django; I have Group, Class, Model and Product as, well, models. These are in a hierarchy of Group{Class{Model{Product}}}. So I made dropdowns which works like: Group Checkbox |-Inner Classes of Selected Group |-Inner Models of Selected…
0
votes
1 answer

two React Componets in One section we upload image and can increase the number of input other section we will preview those images

I am working on a page have two sections. In one section we upload image and can increase the number of input, in the other section we will preview the image. I don't know I am not getting the right id that I want to edit. we can add more fields on…