Images: Local Storage vs. Cloud Plug-in

default discord avatar
jm.sv
3 months ago
3

With the default set-up, it looks like uploads are stored locally. How does this work once you've deployed your site? For example, when using Payload with Next.js and Vercel, once you've deployed, are uploads automatically uploaded and organized into the

/public

directory? How does this work to get newest changes locally?



Zooming out, I'm looking for a little clarity on the best way to handle images on a Next.js + Vercel + Mux marketing site. Mux handles the videos, and I'm not sure if I need to use a separate cloud solution for the images, or if Payload allows me to store images locally.



I'm assuming it makes more sense to integrate a cloud option. In this case, is the

plugin-cloud-storage

my best bet?

  • default discord avatar
    jarrod69420
    3 months ago

    I can add some clarity here.



    If you are looking to deploy on Vercel then you will need to use a third party service to store your images. Vercel's public directory is just for static assets that can be committed to your repo.



    That is just because with Vercel you don't control the server. It would be the same for similar hosts.



    If you were to deploy Payload say on a Digital ocean droplet, you control the server and it comes with a set amount of storage on disk. So in this case you would be able to save images locally

    using

    Payload, but not

    because

    of Payload.

  • default discord avatar
    jm.sv
    3 months ago

    @jarrod69420 thank you! That makes sense. And then if I use Payload Cloud, it's automatically provisioning and S3 bucket and using the

    payload-cloud-plugin

    behind the scenes to store images?

  • default discord avatar
    jarrod69420
    3 months ago

    Yes 💯

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.