not show image from public folder laravel - laravel

I created api for getting image from server and show user but when enter url in server shows (Sorry, the page you are looking for could not be found.)
notice: request work in localhost

Try below code :
<img alt="image name" src="{{ url('image/imagename.jpeg') }}" />

Try this to use public_path() function:
<img src="{{ public_path($IMAGE_PATH) }}">

Related

Display png images on github pages

I have an issue with github pages. The first image "logo.png" of my html page is not displaying.
Here is the error message in the console : Failed to load resource: the server responded with a status of 404 (). logo.PNG:1
My HTML code :
<div class="logo">
<a href="index.html"
><img
class="header__logo"
id="logo1"
src="assets/pictures/logo.PNG"
alt="FishEye Home page"
tabindex="0"
/>
</a>
</div>
I tried following sources for my image :
assets/pictures/logo.PNG
assets/pictures/logo.png
It doesn't work.
Any help ?
create a new issue on github repository.
copy and paste your image on new issue.
after it makes a url of you issue. Use it in your repository or ReadMe.md file.

vue/laravel images not showing (not found) using laravel storage folder

am trying to display my images dynamically from laravel storage folder but it says images not found even though i can see the pictures adding up in the folder, i also tried php artisan link but nothing good
<v-btn flat v-on="on">
<div>
{{connectedUser.name }} {{ connectedUser.last_name }}
<v-avatar size="38px"">
<img :src="'http://api.sirh.test/storage/'+connectedUser.img" />
</v-avatar>
</div>
</v-btn>
Try this.
:src=‘getImage(connectedUser)’
getImage(connectedUser){
return /storage/ + connectedUser.img
}

Laravel- (layout.blade.php inside layout folder) how do i link external css,js in index.blade.php

#extends('layout/layout.blade.php')
Having layout.blade.php it contains css,js. and have to link with index.blade.php. i tried #extends('layout.layout'), is not working.
You can use;
src="{{ asset('path/css or js') }}"

adding images to laravel blades

I m facing strange issue in laravel.
on my local serve it is not accessing this image
http://localhost:8000/img/logo.png
but I can acess this image
http://localhost:8000/img/profile.png
mover over it is not show in code as well any ideas.
Try
<img src="{{ url('img/yourimage.png') }}" alt="">
It will grab the image from your project public folder. It will look like yourwebsite.com/img/yourimage.png and in local server it will look like
http://localhost:8000/img/yourimage.png
2nd Solution:
Try
{{ Html::image('yourimage.png') }}
in laravel there is a inbuilt function url() which is used to ge the path from the public folder of your project. So to show image in your view you can use:
<img src="{{ url('img/yourimage.png') }}" alt="No image found">

Laravel 5 built-in server not serving images

I'm trying to call some images to some views but ther server doesn't send the images.
Here's how i call my images:
<img src="{{ asset('img/'.$vehicle->pic) }}" alt="{{ $vehicle->model }}">
My images are at:
This is what i response i get:
UPDATE 1
Here are the headers of a image:
Why is this happening?

Resources