Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I am using the Laravel framework and trying to display an image in a view. Here is the code in the show template that displays the image.
<img src="storage/cover_images/{{$post->cover_image}}">
In this file, I define the storage directory for the image
But the image won't show in the browser, it just pointing to this path
http://localhost/lsapp/public/posts/storage/cover_images/noimage.jpg while my images are in the lsapp/storage/app/public/cover_images folder.
Based on your question..as you want to display image in view.
run Command: php artisan storage:link
after that now you can display your image in view using Storage:url
<img src="{{ Storage:url($post->cover_image) }}">
Make sure to post code next time instead of screenshot.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I've created simple page where you can add images to database. Here is my code, where i pull images to website:
enter image description here
in DevTools i can see that all images are pulled correctly:
enter image description here
But when i click next/previous
website is reloading, but picture is still the same, and URL is changed:
enter image description here
Do you have any idea why?
I even add JS script to add intervals to this carousel but it's still doesn't work.
Thank you
It seems the problem about javascript library. it is not loading. You need to add full code to test it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I do want to display image slider which is being uploaded by the admin to the slider using php and mysqli. If the admin wants to change the images he would be able to do it by uploading or deleting the images.
Add the image and display
Store the image in a folder by using move_uploaded_file()
Store the image name and path in database
Display it in html by using select query <img src="<?php echo $img; ?>" />
While modify the image
Select the image from database and remove it unlink($file)
Upload new image in directory and update the path in database.
Delete the image
Select the image from database and remove it unlink($file)
Delete the row from database.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
its me again.. is it possible to take webcam stream and add it to webpage? I checked page source. looks like it creates image in folder on their server
(http://www2.hak.hr/rmt/?l=135) is it posible to get that image to my webpage? Thanks anyone for help
You can embed the image with something like this:
<img src="http://www2.hak.hr/hak_webcam/cam.asp?id=22" alt="img"></img>
You just have one problem when the image adress is changing you have to do it too! To prevent the embed from another site it seems like they are adding as url parameter a timestamp.
As you can see they have a copyright on this so you aren't allowed to embed it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
When I click on a link to an jpg image, the browser will usually open a new tab, and diplay it on a white background.
I want to use a generated php page, that will diplay the image, so I could use css on it.
I could put every image on a single php site, and simply link to that, but I want it to happen automatically, once any image link is clicked.
Link
How do I do that?
Change the links to Link or similar, create a showimage.php page that has the formatting you want and use $_GET[ 'image' ] to get the requested image's url.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to create a form inside a PHP file that will allow me to type in a couple text fields and then upload those fields to certain tables/columns in my database. I can figure this out, but another option I want is to upload a song and upload an image to my webserver and then retrieve the link and upload those links to the database..
Does anyone know of a good tutorial for this?
You can find information on the php page.
Here is the link for upolading files information.
http://php.net/manual/en/features.file-upload.php