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

After loadImageFromURL buttons doesn't work #852

Closed
Dmytro9999 opened this issue Mar 30, 2023 · 2 comments
Closed

After loadImageFromURL buttons doesn't work #852

Dmytro9999 opened this issue Mar 30, 2023 · 2 comments
Labels

Comments

@Dmytro9999
Copy link

How to get the menu items to work when you load the image with loadImageFromURL?

@Dmytro9999
Copy link
Author

Dmytro9999 commented Mar 30, 2023

Example of my code below, the problem is loadImage,
When I use my props in the path, the image does not show up (but the url taken from google works)(the images are on the server and I just store the path to them in the base ) . I tried using loadImageFromURL when initializing the component, then the image appears, but the editor buttons don't respond/work.

<ImageEditor
				ref={editorRef}
				includeUI={{
					loadImage: {
					    path: 'https://source.unsplash.com/random/800x600',
				            name: 'sample image',
                                             /path: { props }  doesn't work :(
                                             /path:  props   also doesn't work :(
                                             /my props look:  https://localhost:3000/machine-media//1680214344437-621328386-titleImg.jpg
					},
					menu: ['crop', 'flip', 'rotate', 'draw', 'shape', 'icon', 'text', 'mask', 'filter' ],
					uiSize: {
						width: '1000px',
						height: '700px',
					},
					theme: debug,
					menuBarPosition: 'bottom',
					initMenu: 'rotate',
					cssMaxWidth: 700,
					cssMaxHeight: 500,
					selectionStyle: {
						cornerSize: 20,
						rotatingPointOffset: 70,
					},
				}}
				menuBarPosition='bottom'
				cssMaxHeight={500}
				cssMaxWidth={700}
				selectionStyle={{
					cornerSize: 20,
					rotatingPointOffset: 70,
				}}
				usageStatistics={true}
			/>

Снимок экрана 2023-03-31 в 01 40 08

@Sarafaniuk
Copy link

I also encountered this problem, it seems that the editor does not pull images from localhost, try storing images on the server and specify the path to them, it worked for me so

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

No branches or pull requests

2 participants