{"id":50607584,"url":"https://github.com/peterkyle01/storage-supabase","last_synced_at":"2026-06-06T00:30:31.643Z","repository":{"id":354363752,"uuid":"1222878523","full_name":"peterkyle01/storage-supabase","owner":"peterkyle01","description":"Supabase Storage adapter for Payload CMS 3.0.","archived":false,"fork":false,"pushed_at":"2026-04-28T09:03:19.000Z","size":205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-28T09:33:24.353Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterkyle01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-27T19:51:47.000Z","updated_at":"2026-04-28T09:03:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/peterkyle01/storage-supabase","commit_stats":null,"previous_names":["peterkyle01/storage-supabase"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/peterkyle01/storage-supabase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterkyle01%2Fstorage-supabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterkyle01%2Fstorage-supabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterkyle01%2Fstorage-supabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterkyle01%2Fstorage-supabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterkyle01","download_url":"https://codeload.github.com/peterkyle01/storage-supabase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterkyle01%2Fstorage-supabase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33965591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-06T00:30:30.263Z","updated_at":"2026-06-06T00:30:31.633Z","avatar_url":"https://github.com/peterkyle01.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# storage-supabase\n\nSupabase Storage adapter for Payload CMS 3.0+.\n\nThis adapter integrates Supabase Storage with Payload's upload system. It is designed to be lightweight, using native `fetch` instead of the AWS SDK, and supports Supabase-specific features like direct redirects and image transformations.\n\n## Installation\n\n```sh\nnpm install storage-supabase\n```\n\n## Setup\n\n### 1. Get Your Supabase Credentials\n\nGo to your Supabase Dashboard → **Settings → API** and copy:\n\n- **Project URL**: `https://your-project.supabase.co`\n- **Secret Key**: `sb_secret_...` (from the API Keys section)\n\n\u003e ⚠️ Use the new **Secret Key** format (`sb_secret_...`), not the legacy `service_role` key.\n\n### 2. Set Environment Variables\n\n```env\nSUPABASE_URL=https://your-project.supabase.co\nSUPABASE_BUCKET=your-bucket-name\nSUPABASE_SECRET_KEY=sb_secret_your_secret_key_here\n```\n\n### 3. Configure the Plugin\n\n```ts\nimport { storageSupabase } from 'storage-supabase'\nimport { buildConfig } from 'payload'\n\nexport default buildConfig({\n  plugins: [\n    storageSupabase({\n      bucket: process.env.SUPABASE_BUCKET,\n      supabaseUrl: process.env.SUPABASE_URL,\n      supabaseKey: process.env.SUPABASE_SECRET_KEY,\n      collections: {\n        media: true,\n      },\n      // Optional configurations\n      disableProxy: true,\n      imageOptimization: {\n        quality: 80,\n        format: 'webp',\n      }\n    }),\n  ],\n})\n```\n\n## Configuration\n\n| Option | Type | Description |\n| :--- | :--- | :--- |\n| `bucket` | `string` | **Required**. Supabase bucket name. |\n| `supabaseUrl` | `string` | **Required**. Supabase project URL (e.g., `https://xyz.supabase.co`) or bucket endpoint (e.g., `https://xyz.storage.supabase.co/storage/v1/s3`). Both formats are supported. |\n| `supabaseKey` | `string` | **Required**. Secret API Key in the format `sb_secret_...`. Get this from your Supabase Dashboard → Settings → API → Secret Key. |\n| `collections` | `object` | **Required**. Collection slugs to enable the adapter for (e.g., `{ media: true }`). |\n| `enabled` | `boolean` | Enable/disable the plugin. Default: `true`. |\n| `public` | `boolean` | Set to `true` for public buckets, `false` for private buckets. Default: `true`. |\n| `disableProxy` | `boolean` | Redirect directly to Supabase CDN instead of proxying through the server. Default: `true`. |\n| `imageOptimization` | `object` | Options for Supabase image transformations: `quality` (number), `format` ('avif', 'webp', 'origin'), `resize` ('contain', 'cover', 'fill'). |\n\n## API Key Format\n\nThis adapter requires the **new Supabase API key format**:\n\n- ✅ **Use**: `sb_secret_...` keys (new format)\n- ❌ **Don't use**: Legacy `service_role` JWT keys\n\nIf you only see JWT-format keys in your Supabase Dashboard, your project may need to be upgraded. Contact Supabase support or create a new project to access the new key system.\n\n## Troubleshooting\n\n### \"Invalid Supabase API key\"\n\nMake sure you're using a key starting with `sb_secret_`, not `sb_publishable_` or legacy JWT format.\n\n### \"Unsupported authorization type\"\n\nVerify you're using the correct `sb_secret_...` key and that your bucket name is correct.\n\n### Uploads not working with private buckets\n\nFor private buckets, ensure `public: false` is set in the configuration, and that your Supabase bucket has appropriate access policies.\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterkyle01%2Fstorage-supabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterkyle01%2Fstorage-supabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterkyle01%2Fstorage-supabase/lists"}