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

Choose output image format with PickerOverlay #143

Open
rodrigojmayer opened this issue Feb 19, 2024 · 0 comments
Open

Choose output image format with PickerOverlay #143

rodrigojmayer opened this issue Feb 19, 2024 · 0 comments

Comments

@rodrigojmayer
Copy link

Hello.
Im not sure if this is the right place to ask but I can't find how to solve this problem.
I'm trying to set the output format in "webp" so the files take up less space in the Filestack web.
I have been able to do it after the image is loaded, by entering /auto_image/ in the url, but what I need is to change the format before saving the image, and not just to download it. I tried in different ways to use "transformOptions", "convert", "output", "format" but I have not had success. This is part of my code where I think I should set the configuration:

import { PickerOverlay } from 'filestack-react';

<PickerOverlay
    apikey={apiKey}
    onUploadDone={(res: any) => {
        if(imageUrl){
            onHandleUnsavedImages(imageUrl)
        }
        onSetImageUrl(res.filesUploaded[0].url)
    }}
    pickerOptions={{
        onClose: () => {
            handleShowPicker()
        },
        accept: ["image/*"],
    }}
/>

Thanks in advance

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

1 participant