Member-only story

Uploading and viewing images with your Laravel 10 project

Laravel Image Uploads: How to Display Images on Digital Ocean App Instances

Edwin Klesman
3 min readJul 21, 2023
How to upload and view images from your Laravel project to Digital Ocean’s App Platform or other cloud-based services. This article shows you how you can enable uploading and viewing images from your Laravel project (either using self-coded upload functionality or a plugin) so that they will show up properly. Laravel Developer Upload Images Tutorial Article EEKAY ONLINE

In a Laravel project hosted on Digital Ocean’s App Platform, managing and displaying images efficiently is crucial.
Often, developers encounter issues when images uploaded using certain plugins don’t appear in the browser after deploying the project.

This problem can be resolved by creating a symbolic link (also: symlinks) between the image storage location and the public directory.
In this blog post, I will show you how to ensure images uploaded from your Laravel project are accessible in the browser on a Digital Ocean app instance.

The Challenge: Missing Images on Digital Ocean

When hosting a Laravel 10 project on Digital Ocean, one common issue faced by developers involves images that have been uploaded locally using plugins but do not appear when the project is deployed.

This discrepancy occurs because the local development environment and the production environment on Digital Ocean have different file system structures.

In your local environment, Laravel typically stores uploaded images in the /storage

--

--

Edwin Klesman
Edwin Klesman

Written by Edwin Klesman

Senior dev @Detacom | cross-platform mobile & web dev | Product Maker | SaaS | from app ideas to implementation | Owner eekayonline.com | Music: edsonkailes.com

No responses yet