PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, April 20, 2022

[FIXED] How to access images in the local storage?

 April 20, 2022     google-2fa, laravel, laravel-9, qr-code     No comments   

Issue

I'm working on a project which has to retrieve some data from the local storage. I'm saving a personal image to the locale storage, but when I'm trying to retrieve the image I'm getting 404 ERROR.

Error: http://localhost:8000/storage/app/img.png

This is the way I'm trying to get the image:

<img src="{{ asset('storage/app/img.png') }}" />

I red the Laravel documentation, but I don't know what is the problem.


Solution

Make sure that you are set the symlink with: php artisan storage:link.

Afterwards you can check: <img src="{{ asset('storage/app/img.png') }}" /> or: <img src="{{ asset('storage/img.png') }}" />



Answered By - Maik Lowrey
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home
View mobile version

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing