Public link for image

Whenever you create API and want to fetch images for multiple domain then use the below command.

php artisan storage:link
Sometimes you might face issues like storage link created but images still not displaying at the frontend then simply run below list of commands:
rm public/storage
php artisan optimize:clear
php artisan storage:link

If you are working on windows then make sure you have Git installed before running these commands.

Leave a Reply

Your email address will not be published. Required fields are marked *