In this images shows what happen
HTML code is here- In this some of my images showing in webpage and some of is not..how should i fix it
<img src="img/uploadFiles/{{room.imageLocation.split('//')[6]}}/{{room.imageLocation.split('-')[1]}}" alt="Image Loading Failed"/>
Use ng-src instead of src when you are binding images
<img ng-src="img/uploadFiles/{{room.imageLocation.split('//')[6]}}/{{room.imageLocation.split('-')[1]}}" alt="Image Loading Failed"/>
<img src="img/uploadFiles/{{room.imageLocation.split('//')[6]}}/{{room.imageLocation.split('-')[1]}}" alt="Image Loading Failed" onError="this.src='./assets/img/placeholder.png'" />
Related
I embedded several images into my HTML email template using the syntax below.
<figure id="keyboardimg">
<img src="/img/keyboard.jpg" alt="Keyboard image" title="Keyboard image">
</figure>
I used both of the following "hypertext references" to link the images to the HTML email template but the images are not showing. Any advice on how to address this issue will be really appreciated.
https://pnivar.imgbb.com/
https://ibb.co/L6SYdwz
You were using "relative URLs." They assume that the image is found on the same server as the document. When the document is served by email, the image is not on the email server, and the relative URL doesn't work. When sending an email, you need to reference all resources (including images) using absolute URLs.
<figure id="keyboardimg">
<img src="https://i.ibb.co/nfr6M2s/Modern.jpg" alt="Keyboard image" title="Keyboard image">
</figure>
I have this code that lazy loads images
<img src="https://source.unsplash.com/1600x900/?hotel,booking.com?v=1" loading="lazy" />
<img src="https://source.unsplash.com/1600x900/?hotel,booking.com?v=2" loading="lazy" />
<img src="https://source.unsplash.com/1600x900/?hotel,booking.com?v=3" loading="lazy" />
<img src="https://source.unsplash.com/1600x900/?hotel,booking.com?v=4" loading="lazy" />
and this is how it looks like https://jsfiddle.net/pg968ntz/
The image url should load a new image everytime its refreshed or loaded. I have used lazy loading to make that happen and it works in plain html.
However, using the same code inside a vue js template results in the same image being loaded. I have tried even binding a variable <img :src="image_link" width="200" height="200" loading="lazy" />
but still loads the same image four times instead of a different image four times. Is there a way i can fix this to load four different images inside of a vue js template?
I think you can do like this.
Please confirm this URL https://stackblitz.com/edit/vue-wvu8sm?file=src%2Fcomponents%2FHelloWorld.vue
<template>
<img v-for="(image, index) in images" :key="index" :src="image" width="200" height="200" loading="lazy" />
</template>
export default {
data() {
return {
images: [
"https://source.unsplash.com/1600x900/?hotel,booking.com?v=1",
"https://source.unsplash.com/1600x900/?hotel,booking.com?v=2",
"https://source.unsplash.com/1600x900/?hotel,booking.com?v=3",
"https://source.unsplash.com/1600x900/?hotel,booking.com?v=4",
]
};
}
}
I'm having trouble understanding how to get images to display on this ASP.net project. I'm used to using tags, but am having trouble with the paths.
I have tried all of these solutions and none cause the image to display:
<img src="~/Images/mask.png" alt="Sample Photo" />
<img src="~/Images/mask.png" alt="Sample Photo" runat="server" />
<img src="../Images/mask.png" alt="Sample Photo" />
<img src="Images/mask.png" alt="Sample Photo" />
<img src="../Images/mask.png" alt="Sample Photo" />
The Images folder is in the project root. I'm using Bootstrap 4.0 and no other CSS.
If I set the src to a link (to Imgur, for example), the image displays. This makes me think it's an issue with the path, but I don't know what it could be. I think I've tried every variation that I came across when googling.
Any guidance would be really appreciated, and please let me know if I need to elaborate.
Place images in wwwroot folder.Details in documentation
I am trying to add an image on html page but it doesn't appear
<img href="img/bg.jpeg" alt="welcom" />
everything seems to be fine what is wrong with code i test it many times
It test it on two browsers chrome 19 and firefox
I tried the same with another image extension but i doesn't work
<img href="img/2.png"/>
where is the problem
You're using the wrong attribute, instead of href you need to use src - the former is for links.
This would be the correct usage:
<img src="img/bg.jpeg" alt="welcom" />
The problem is just in: href the attribute
href attribute is for ancre link <a href="#">
<a href="directory">
The src attribute is for: img tag
<img src="directory"/>
and if you want to set a background with css you only have to add
background-image : url('directory');
Trust me its so easy to get confused by this stuff
So i suggest to change href attribute with src
<img src="img/bg.jpg" alt="Welcom" />
And it should work fine
You have to write
<img src="img/bg.jpeg" alt="welcom" />
istead of
<img href="img/bg.jpeg" alt="welcom" />
You need to use src not href to point to the image file name.
<html>
<img src="imagefilename.jpg">
</html>
This code will display an image with the filename imagefilename.jpg that is in the same directory as this html file
<img src="#" alt="abc"/>
after above code rendered in browser the position of alt and src are changed like
<img alt="abc" src="#"/>
Is there is any way to fix these problem
"I want that every time src comes before others attributes!"