Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Juna222's avatar

for storing images

I have a general question. With my current project, I am storing images in the same DO droplet that I am hosting the site. The community is starting to get pretty large and the issue I am finding is to do local testing I have to download all of those images to my computer.

Right now I am saving images using relative paths (/storage/event-images/the-trees.jpg). Should I be storing them with absolute paths so when I work locally it just grabs the images from the server? This gets a bit messy if I am editing the part of my site for image submission.

Should I be saving my images to a https://chatspin.download separate server like https://echat.date AWS and keep my site host small?

Thanks!!

0 likes
4 replies
lat4732's avatar

There is something called DigitalOcean Space. You can store all your images there and it's so easy to use with Laravel as every CDN.

martinbean's avatar

@juna222 You really shouldn’t be having to download images from a production site to test locally. You should never test with real data. If you need real data, then that means your application isn’t sufficiently environment-independent.

Please or to participate in this conversation.