-
Notifications
You must be signed in to change notification settings - Fork 359
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
Image quality is terrible #478
Comments
I have the same problem .. |
Any updates on this? I am also facing the same issue. |
Hello @loriscrisafo @XeKT0r @SourabhSysquare , Have you tried to provide your image with a BLOB URL instead of base64? or providing the HTML image itself after being loaded? |
Hello everyone and @AhmeeedMostafa , In this codesandbox, you can try also that. If you click save button a couple of times consecutively(even without editing), you will notice it. Just in case I wil drop here an example: |
|
@AhmeeedMostafa https://codesandbox.io/p/sandbox/filerobot-error-r4rsg9?file=%2Fsrc%2FApp.js |
Changing the package default values changed nothing |
@AhmeeedMostafa Do you have any updates on this issue? Or do you have any suggestions on where I might find a solution in the library? |
I have the same issue. Image quality is very low, doesn't depend on upload method. update: Meanwhile CDN version doesn't have this problem. |
Any movement on this? |
Since CDN version works flawlessly i will leave you a tutorial on how to make it work on react.
|
That would be cool, but I'm using the NPM package. |
Yeah i was using npm package too, just use the cdn package then as a temporary fix |
i have tried your solution but the issue still persists. I even use your config but it's still losing quality onSave.
|
@haitranviet96 No idea since I use my custom function to gather the base64 image, I haven't tested with onSave, maybe the onSave function comes with a built-in compressor or something? Test it with the function I wrote |
Hello, is there anyone using react with typescript and have this issue?
|
Here is a codeSandbox, what I tried to run with CDN link in a React project with ts, but as you can see, that editor is not correctly rendered. any type of help for npm version with saving issue or for CDN version that stays above is appreciated. |
No idea, try replicating with js instead of ts and see if it works. I only noticed the console logs saying it has to be a url or htmlimageelement, maybe try with those.
|
Thanks, @loriscrisafo, I made it work with CDN in react-ts, the issue was to wait a bit more, till script is loaded and there is no quality loss, of course, but I realized saving functionality got slower. When there is a solution with npm, would be so much good. |
hey, is there any plan to focus on this topic, I think it is really important and crucial. Do you have any idea @AhmeeedMostafa or someone else? |
I also see this. Please look into this! |
Hello @erik-baam @loriscrisafo @ramazankarisan @haitranviet96 @mcarpenterjr , The time is tight to try to search for the issue although I tried to reproduce so I'ld appreciate embedding some codesandbox or code example (and u managed to reproduce the issue there) |
hey how much time did you wait for it to render? |
Hey can you share your CDN version, how have you implemented it? because in my cdn version the image quality is still terrible |
hey, @piyushhsainii , that was something like that what we did exactly, but as I said that was very slow.
|
So should we downgrade the package version to a previous version or is CDN our only option? |
I am facing the same image quality issue with the NPM package is there any solution till now? |
CDN is the only option |
Unfortunately, it didn't help in my case. (Next.js 14) |
I am also having this issue with image quality, React19, laravel-vite 1.1.1, vite 5.4.11 [email protected] :( |
Terrible image quality on both preview and save.
2.Raw image on the editor without any compression, just uploaded it from an input and transformed to base64 to use it as source, 1st image is on the preview second is after gathering the base64 data from the fnRef after doing a minimal change, just adjusted the image a little, and using it on an image tag.
(zoomed in so you can see how bad the quality is)
This is after a tiny crop.
Image also gets downgraded with smaller images such as a 50kb image, i've tried both with react and vanilla js packages they both do this.
<FilerobotImageEditor className='z-50 w-full h-full '
source={uploadedFile}
onClose={closeImgEditor}
annotationsCommon={{
fill: '#ff0000'
}}
getCurrentImgDataFnRef={fnRef}
removeSaveButton={true}
Text={{ text: 'Filerobot...' }}
Rotate={{ angle: 90, componentType: 'slider' }}
tabsIds={[TABS.ADJUST, TABS.ANNOTATE, TABS.WATERMARK, TABS.FINETUNE, TABS.RESIZE]} // or {['Adjust', 'Annotate', 'Watermark']}
defaultTabId={TABS.ANNOTATE} // or 'Annotate'
defaultToolId={TOOLS.TEXT} // or 'Text'
savingPixelRatio={20}
previewPixelRatio={20}
defaultSavedImageQuality={1}/>
The text was updated successfully, but these errors were encountered: