Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
How to display images with Vue?

I am using Vue and my image paths are not working. I have tried these different variations:

<figure class="workout-image">
            <img :src= "images.bicep" width= "200px" length= "300px">
            <figcaption>Bicep Curl</figcaption>
          </figure>
        
         <figure class="workout-image">
            <img :src= "'https://thumbs.dreamstime.com/z/bench-press-exercise-chest-man-doing-workout-bench-press-exercise-chest-man-doing-workout-barbell-bodybuilder-157558597.jpg'" width= "200px" length= "300px">
            <figcaption>Bench Press</figcaption>
          </figure>

          <figure class="workout-image">
            <img v-bind:src= "'../assets/images/workouts/TricepExtension.png'" width= "200px" length= "300px">
            <figcaption>Tricep Extension</figcaption>
          </figure>

I have my images in my src/assets folder and the full path is src/assets/images/workouts. I always get a little icon not displaying the image. image not showing up

edit: I do not put anything in the tag

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Assuming you have your assets folder in your src folder, vue-loader should load them in for you, and you can access them using @/assets/rest/of/path.

<figure class="workout-image">
    <img src="@/assets/images/workouts/TricepExtension.png" width= "200px" length= "300px">
    <figcaption>Bicep Curl</figcaption>
</figure>

See this section about vue asset url handling

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!