supabase-image-optimiser
v1.0.0
Published
A script for optimising images kept in Supabase storage.
Readme
Supabase Image Optimiser
A script for optimising images kept in Supabase storage.
Converts image files to .webp and re-uploads them to Supabase.
Usage
Run the script with:
npx supabase-image-optimiser --url <PROJECT-URL> --key <SERVICE-ROLE-KEY> --bucket images --folder publicYou can check the results of the compression by looking in the ./images folder.
The following command line arguments are available.
| Argument | Description | Default |
|------------|-----------------------------------------------------------|-------------|
| --url | A Supabase project URL. | - |
| --key | A Supabase service role key. | - |
| --bucket | The Supabase bucket where your images are kept. | - |
| --folder | A folder within the bucket where your images are kept. | - |
| --dry | Run without actually uploading anything to Supabase. | - |
| --max n | Limit the conversion to the first n unconverted images. | 100 |
