Image does not appear in view, in production environment

Asked

Viewed 405 times

-1

I have the path of the images saved in the database, and the images in a folder inside the public folder (filename/public/image-post/post_id_2.jpg). in development environment, it usually appears in the view. But in production environment it does not appear, but the image path is saved in the database.

Another detail is that the images that have already been recorded in the bank before hosting the site, appear normally.

Please help me. I thank you in advance.

1 answer

-2

If you are using Laravel, you should use the method of asset() to take images as shown in the documentation.

https://laravel.com/docs/5.8/filesystem

Also check that your framework is set to recognize the folder where you are saving your images.

  • How would this framework check?

  • I put the Asset() method, but it remains the same, nothing appears.

  • While this link may answer the question, it is best to include the essential parts of the answer here and provide the link for reference. Replies per link only can be invalidated if the page with the link is changed. - Of Revision

  • To check the configuration just go to config/filesystems.php By default Laravel uses the folder storage/app/public To help you, right-click your mouse on top of the broken image, then on inspecionar elemento and see which way is your src

  • @veroneseComS the answer is "use the method asset()" and to use this and any other resource the correct is to ALWAYS resort to documentation.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.