question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Images are not displayed

See original GitHub issue

Images 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: com

in iphone 5 real device: sem

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:

captura de tela 2016-11-19 as 18 04 53

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
rstoenescucommented, Nov 21, 2016

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.

0reactions
xeredacommented, Nov 21, 2016

Ok! Its work!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found