Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Help Wanted] React Image Crop does not render. #288

Closed
fzs1994 opened this issue Aug 12, 2019 · 6 comments
Closed

[Help Wanted] React Image Crop does not render. #288

fzs1994 opened this issue Aug 12, 2019 · 6 comments

Comments

@fzs1994
Copy link

fzs1994 commented Aug 12, 2019

Screenshot (2)
I'm able to get image base64 in source of image cropper, but <ReactCrop> does not render.

let LogoCropper = null;
		if (this.state.logoImage) {
			LogoCropper = (
				<ReactCrop
					src={this.state.logoImage}
					crop={crop}
					onImageLoaded={this.onImageLoaded}
					onComplete={this.onCropComplete}
					onChange={this.onCropChange}
				/>
			);
		}
@sekoyo
Copy link
Owner

sekoyo commented Aug 12, 2019 via email

@fzs1994
Copy link
Author

fzs1994 commented Aug 12, 2019

Yes, I did

import ReactCrop from 'react-image-crop';
import 'react-image-crop/dist/ReactCrop.css';

@sekoyo
Copy link
Owner

sekoyo commented Aug 12, 2019

It seems likely that your base64 data is invalid in that case, it is just an image tag and if your base64 data is correct then an image would show - so long as the container has at least some width set. Try pasting your base64 data into an <img> in a blank JSFiddle for example. If it doesn't show anything it's probably invalid.

@fzs1994
Copy link
Author

fzs1994 commented Aug 13, 2019

I figured out, there was some issue with .ReactCrop__image styles in ReactCrop.css
image

Overriding max-height: none resolves the issue in my case

@fzs1994 fzs1994 closed this as completed Aug 13, 2019
@sekoyo
Copy link
Owner

sekoyo commented Aug 13, 2019 via email

@sekoyo
Copy link
Owner

sekoyo commented Sep 5, 2019

Should be fixed in 8.3.0 (removed max-height property)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants