Supercharging Medusa v2 with Supabase Storage

Alright, developers—let’s talk file storage. Medusa v2 is an awesome headless commerce engine, but if you need a place to store your product images, user uploads, or any other files, you need a solid storage solution. AWS S3? Great, but it can get expe…


This content originally appeared on DEV Community and was authored by Jake Ngatchu

Alright, developers—let’s talk file storage. Medusa v2 is an awesome headless commerce engine, but if you need a place to store your product images, user uploads, or any other files, you need a solid storage solution. AWS S3? Great, but it can get expensive fast. Firebase? Locked into Google’s ecosystem. Enter Supabase Storage—the perfect mix of free (yes, free!), scalable, and easy to use.

I built medusav2-file-supabase-storage because we’re on a mission: helping startups and businesses get their Medusa stores running for the lowest possible cost while making sure they stay scalable. If you’re just starting out, every dollar counts, and this plugin lets you save money now without setting yourself up for failure later.

What This Plugin Does

Uploads files straight to a Supabase storage bucket.

Gets public URLs for those files (because sharing is caring).

Deletes files when you don’t need them anymore.

Uses Supabase’s Storage API, making everything smooth and simple.

Installation (Super Easy)

Just run:

npm install medusav2-file-supabase-storage

Setting It Up in Medusa

Add this to your Medusa config under modules:

modules: [
    {
        resolve: "@medusajs/medusa/file",
        options: {
            providers: [
                {
                    resolve: `medusav2-file-supabase-storage/modules/file`,
                    options: {
                        bucketName: process.env.BUCKET_NAME,
                        supabaseUrl: process.env.SUPABASE_URL,
                        apiKey: process.env.SUPABASE_KEY,
                    },
                },
            ],
        },
    }
],

How to Use It

Upload a File

Once it’s set up, Medusa will automatically use Supabase for file storage when handling uploads. No extra steps needed!

Delete a File

If you need to remove a file, Medusa will handle deletion requests through the configured provider.

Why This is Good for You!

It’s Free: Supabase gives you a generous free tier. No surprise bills!

It Scales: Your store grows? Supabase grows with you.

Lower Startup Costs: Spend less on infrastructure and more on building your business.

Smooth Integration: Works seamlessly with Medusa v2, no hacks required.

Contribute & Customize

Want to tweak it? Go for it:

Clone the repo.

Install dependencies.

$ yarn install

Add whatever features you need.

Final Thoughts

If you’re using Medusa v2 and don’t want to overcomplicate file storage (or waste money), medusav2-file-supabase-storage is the way to go. It’s free, simple, and built for growth. Get started today and keep your infrastructure costs low while keeping things future-proof. 🚀


This content originally appeared on DEV Community and was authored by Jake Ngatchu


Print Share Comment Cite Upload Translate Updates
APA

Jake Ngatchu | Sciencx (2025-03-16T21:56:08+00:00) Supercharging Medusa v2 with Supabase Storage. Retrieved from https://www.scien.cx/2025/03/16/supercharging-medusa-v2-with-supabase-storage/

MLA
" » Supercharging Medusa v2 with Supabase Storage." Jake Ngatchu | Sciencx - Sunday March 16, 2025, https://www.scien.cx/2025/03/16/supercharging-medusa-v2-with-supabase-storage/
HARVARD
Jake Ngatchu | Sciencx Sunday March 16, 2025 » Supercharging Medusa v2 with Supabase Storage., viewed ,<https://www.scien.cx/2025/03/16/supercharging-medusa-v2-with-supabase-storage/>
VANCOUVER
Jake Ngatchu | Sciencx - » Supercharging Medusa v2 with Supabase Storage. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/03/16/supercharging-medusa-v2-with-supabase-storage/
CHICAGO
" » Supercharging Medusa v2 with Supabase Storage." Jake Ngatchu | Sciencx - Accessed . https://www.scien.cx/2025/03/16/supercharging-medusa-v2-with-supabase-storage/
IEEE
" » Supercharging Medusa v2 with Supabase Storage." Jake Ngatchu | Sciencx [Online]. Available: https://www.scien.cx/2025/03/16/supercharging-medusa-v2-with-supabase-storage/. [Accessed: ]
rf:citation
» Supercharging Medusa v2 with Supabase Storage | Jake Ngatchu | Sciencx | https://www.scien.cx/2025/03/16/supercharging-medusa-v2-with-supabase-storage/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.