I recently deployed a small laravel app on the digital ocean apps platfrom and images I had saved in my public/images folder are’t displaying. My image tag looks like so
<img alt="image" src="{{ asset('images/port_site.png') }}"/>
I am not sure if I am missing anything when it comes to the deployment or where these images should be located but everything looks correct on my end and the images display when I am building locally but once deployed they wont display.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there @blaynebennett99,
I could suggest a couple of things:
app/Providers/AppServiceProvider.php
file and in the boot
method add the following: if ($this->app->environment('production')) {
\URL::forceScheme('https');
}
Let me know how it goes! Regards, Bobby
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Im having the issues with our Codeingitor PHP application. I dont get any error - the image is getting uploaded, but the image just wont show up in the front end. For example, the applications asks employees to upload their photo, they are able to upload, but image wont load. Please help!