1.0.0 • Published 1 year ago

supabase-image-optimiser v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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 public

You can check the results of the compression by looking in the ./images folder.

The following command line arguments are available.

ArgumentDescriptionDefault
--urlA Supabase project URL.-
--keyA Supabase service role key.-
--bucketThe Supabase bucket where your images are kept.-
--folderA folder within the bucket where your images are kept.-
--dryRun without actually uploading anything to Supabase.-
--max nLimit the conversion to the first n unconverted images.100