How can I display a PDF in a Laravel View like I can display a normal
image?
The code I am using to implement an image is:
<div class="u-img">
<img
src="image/{{ Auth::user()->photo_jpeg }}"
alt="profile"
/>
</div>
What options/HTML-tags can I use to display a PDF?
Related
I have a profile photo set up in a std header like so
<img src="{{ Auth::user()->profile_photo_url }}" class="img-circle" alt="User Image" />
When I sign in and land on my dashboard page using this header everything works great.
When I route to any other screen using the same header the picture does not show.
If I inspect the img src I get the same img src from all screens wether the picture shows up or not.
Any insight would help.
<img src="storage/profile-photos/1715359786021735.png" class="user-image" alt="User Image">
I am trying to src an image into my html. Using Laravel as a backend.
<img class="card-img-top" src="storage/app/public/photos/{{$photo}}" alt="Card image cap">
I have also used the system link command and tried,
<img class="card-img-top" src="storage/{{$photo}}" alt="Card image cap">
In the past this would have been sufficent however, when using Laravel this does not link the image.
Does Laravel not allow direct 'src' links, or am I messing up the 'src' file structure?
Laravel uses blade syntax, variables ($) need to be between {{ }} in order to output their value.
So give <img class="card-img-top" src="storage/app/public/photos/{{ $photo }}" alt="Card image cap"> a try :)
i think the simple call like
<img src="storage/image/{{$data->photo}}" alt="">
$data = result from foreach
photo = column in db.
Correct file path is:
src="storage/photos/{{photo}}"
It skips /app/public
src="{{ url('assets/img') }}/{{ $item->photo }}"
Works for me!
I have a image that want show in slide show I use html tag <img src="">,
I'm new in laravel and I don't Know How to show image in my blade.
How I can use <img> tag in laravel?
<img src="{{ asset('/public/upload/image.jpg') }}">
If your image in public folder
If you have stored images inside laravel public directory then, you can use asset which refers to public/ directory.
If you have image at public/images/abc.png then, you can add image in view like this:
<img src="{{ asset('images/abc.png') }}">
I added a custom field for all cms pages and enabled text editor and i display the value in a phtml file.
This is working fine,but the images not showing properly,it is not evaluated,it display like as below,
<img style="float: left;" title="Incorrect method of de-coiling " src="{{media url=" wysiwyg="" faqs="" 2-incorrect-method.jpg"}}"="" alt="Incorrect method of de-coiling " width="230">
I display this content via the following code
<?php echo nl2br($post['post_content']); // display content ?>
Please help me to evaluate this content properly,I am new in magento
When adding images using wysiwyg editor button they will be relative to root/media/wysiwyg directory
img src="{{media url="wysiwyg/myfile.jpeg"}}"/>
I am content with my current theme but the photosets are not laying out properly, they are the same width with my photos but say for instance i reblog a photoset with the photos side by side, it wont show up that way on my blog it will show up underneath each other and that is very frustrating since it makes the images blury.
This is my photoset html code. Is there anyway to correct this?
</div>
{/block:Photo}
{block:Photoset}
<div class="entry">
<div class="photosetbox">
{block:Photos}
<img src="{PhotoURL-HighRes}" class="highres">
{/block:Photos}
{block:IndexPage}
<div class="photosett">
{block:Date}
{block:NoteCount}{NoteCountWithLabel} • {/block:NoteCount}{12Hour}:{Minutes} {CapitalAmPm}
{/block:Date}
</div>
<div class="photoset_a">
</div>
{/block:IndexPage}
</div>
Photoset Photos
Your current code specifies that you want each photo from photoset to rendered in the html as an img tag:
{block:Photos}
<img src="{PhotoURL-HighRes}" class="highres">
{/block:Photos}
To render a photoset, you have two options. Either use the built in feature / theme operator. This will give you an iframe with a photoset prebuilt inside it:
{Photoset-700}
Or use a plugin to take your current code and turn it into a photoset.
References
Tumblr Theme Operators - Photosets
Photoset Grid jQuery Plugin