You only create the folder /storage/app/public
This is where you upload the images to.
Running php artisan storage:link will create a symlink from /public/storage --> storage/app/public/
So when you now add the following HTML:
<img src="/storage/custom_folder/image.jpg">
// or
<img src="{{ asset('/storage/custom_folder/image.jpg') }}
It will use the image from
/storage/app/public/custom_folder/image.jpg
You should not create anything else, it should then already work.
If it does not, check the following:
- The symlink is working:
ls -al /path/to/publicshould show a symlink 'storage' linked to/path/to/storage/app/public - The image file / path exists :
-
ls -al /path/to/public/storage/ -
ls -al /path/to/public/storage/custom_folder -
ls -al /path/to/public/storage/custom_folder/image.jpg
-
- the image is accessible via the browser:
http://my-domain.test/storage/custom_folder/image.jpg