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.

qimg :src"https://image.png" doesn't work

See original GitHub issue

What happened?

I am currently using quasar2 with vue3 and here is the scenario: Why when I put <img src="https://images.png" /> does it display an image and when I put <q-img src="https://images.png" /> the image does not s not display?

Does Qimg only process images locally?

thank you very much for your answer

What did you expect to happen?

Qimg should display url image from external resource

Reproduction URL

https://codesandbox.io/s/q-img-src-1r1evc

How to reproduce?

  1. Select a page
  2. Make axios request
  3. pass the result data url inside qimg src
  4. Image don’t display

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

SPA Mode

Platforms/Browsers

Chrome

Quasar info output

No response

Relevant log output

No response

Additional context

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
MilosPaunoviccommented, Apr 29, 2022

The problem is that you are using wrong piece of data - when you fetch images, you get array of objects, and the property download_url of every image is the one you’ll need to use and, you need to pass either height or width to your QImg component.

So, if you change it to:

<q-img :src="image.download_url" width="200px"></q-img>

it will render just fine.

1reaction
AndrianDcommented, Apr 30, 2022

Thank you very much for your answer!

Read more comments on GitHub >

github_iconTop Results From Across the Web

QImg - Quasar Framework
The QImg component makes working with images (any picture format) easy and also adds a nice loading effect to it along with many...
Read more >
QImg and ~assets src | Quasar Framework Community
I'm struggling to understand why this works: But this doesn't: Can someone explain? What way should I be referencing the assets folder so ......
Read more >
Vue CLI quesar plugin q-image not showing image
I am using quasar as a plugin in my vue. I am having trouble using the q-image ...
Read more >
<img>: The Image Embed element - HTML - MDN Web Docs
The src attribute is required, and contains the path to the image you want to embed. The alt attribute holds a text description...
Read more >
How To Use In HTML »
This is the most straightforward, and is the only way to go if you want to link to an external image (an image...
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