Nisha Patel
Problem
I want to display images in the front end. Images were saved in the PostgreSQL database with a static path. I'm trying to set up an Express server to serve these images, but it's not working.
Here code:
productCard
productItem
This is what I got when I log file:
server
How to fix it? Thank you
Solution
Since you serve your files from “/assets” path, then you need to use the correct path in your ProductItem component
<img alt="example" src={`/assets/${file}`} />
Answered by: >Abdulrahman olalekan
Credit: >StackOverflow
Blog Links:
>How do I customize controller actions in Laravel Jetstream?
>Run Laravel Project to Active Local Server
>How to show encrypted user id in URL in Laravel?
>How to fix Laravel LiveWire listener?