Images are not displayed
See original GitHub issueImages are not displayed
Images do not appear with the application running on the actual “device”. I’m testing on an iphone 5 (ios10.1) and the images are not displayed. This occurs apparently when the “src” of the image is dynamic.
Look at this:
in browser:
in iphone 5 real device:
Component source code:
<template>
<div>
<div slot="header" class="toolbar primary">
<quasar-search v-model="search" class="primary"></quasar-search>
</div>
<div class="layout-padding">
<div class="list item-delimiter">
<router-link to="/detalhesMedico" tag="div" class="item three-lines" v-for="(medico, index) in listaComFiltro">
<img class="item-primary" :src="getAvatarURL(medico.id)">
<div class="item-content has-secondary">
<div>{{ medico.nome }}</div>
<div>
<span>{{ medico.especializacao }}</span><br />
(crm {{ medico.crm }})
</div>
</div>
<div class="item-secondary stamp">
{{ medico.dist }}
</div>
<i class="item-secondary">location_on</i>
</router-link>
</div>
</div>
<button @click="sendAllProviders()" class="negative circular shadow-3 absolute-bottom-right" style="right:20px; bottom:25px;"><i>done_all</i></button>
</div>
</template>
<script>
import { Dialog, Toast } from 'quasar'
import { mapActions } from 'vuex'
export default {
mounted () {
this.setHeaderTitle('Por médico...')
},
data () {
return {
infiniteScrollOn: true,
search: '',
listaMedicos: [
{ id: 1, nome: 'Mauriano Salazar', especializacao: 'Cardiologia', crm: 5765, dist: '550 m' },
{ id: 2, nome: 'Paula Guimarães', especializacao: 'Cardiologia', crm: 21308, dist: '970 m' },
{ id: 3, nome: 'Sérgio Silva Souza', especializacao: 'Cardiologia', crm: 98123, dist: '1,1 km' }
// { id: 4, nome: 'Felipe Schirmandt', especializacao: 'Cardiologia', crm: 66545, dist: '1,2 km' },
// { id: 5, nome: 'Lizandra Hermann', especializacao: 'Cardiologia', crm: 97878, dist: '1,3 km' }
]
}
},
methods: {
...mapActions([
'setHeaderTitle'
]),
getAvatarURL (id) {
return '../statics/img/avatars/' + id + '.jpg'
},
sendAllProviders () {
Dialog.create({
title: 'Solicitar Agenda',
message: 'Você deseja solicitar agenda para todos os médicos da lista?',
buttons: [
{
label: 'Cancelar',
handler () {
console.log('Disagreed...')
}
},
{
label: 'Sim',
handler () {
console.log('Agreed!')
Toast.create.positive('Solicitação enviada')
}
}
]
})
}
},
computed: {
listaComFiltro () {
return this.listaMedicos.filter((element) => {
return element.nome.toUpperCase().indexOf(this.search.toUpperCase()) > -1
})
}
}
}
</script>
Location of the images in the project:
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Why Are Web Page Images Not Showing? - Computer Hope
Possible causes · The web page is not pointing to the correct URL (location) of the image. · The server or computer hosting...
Read more >How to Fix Images Are Not Loading on Website?
How to Fix Images Are Not Loading on Website? · Fix 1: Open the Image in Different Browser · Fix 2: Check your...
Read more >How to Fix Images Not Loading in Chrome - Online Tech Tips
When Chrome doesn't display images on a site, switch to another web browser on your computer and see if you can load the...
Read more >"Images are not displayed" issues on Gmail? - 348774
No matter how many times I click "Always display images from...", Gmail is not automatically displaying my images. This wasn't a - 348774....
Read more >7 Methods to Resolve Images Not Showing in Google Chrome
Method 1: Make Sure the Show Pictures Option is Checked; Method 2: Delete Temporary Files; Method 3: Disable Your Antivirus Temporarily; Method ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So it isn’t an issue. Anyway, it should be
:src=" 'statics/img/avatar.jpg' "
so it will work from all src paths. Please reopen if there is something. Webpack is so convoluted at times, but you need to understand how it packs assets.Ok! Its work!