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

198
Views
What path to images to use while modifying <img>.src?

The project goes like this. There is index.html. Inside there is a tag

<template>
        <div class="card">
            <h3 class="card_header" id="card_header"></h3>
            <img src="./assets/galaxy_a32_123gb.png" alt="" class="card_img" id="card_image">
            <div class="card_description"> 
                <span class="" id="card_name">samsung</span> •
                <span class="" id="card_year">2020</span> •
                <span class="" id="card_color">gray</span> •
                <span class="" id="card_cameras">5 камер</span> •
                <span class="" id="card_popularity">популярный</span> •
                <span class="" id="card_quantity">35 штук</span>
            </div>
        </div>
    </template>

By going through all elements of an array

export let phones: Phone[] = [
    new Phone("../assets/galaxy_a14_32gb.png", 'samsung', "Galaxy a14", 2020, 'light', 3, true, 20),
    new Phone("../assets/galaxy_a32_123gb.png", 'samsung', "Galaxy a32 128GB", 2021, 'light', 3, false, 15),
    new Phone("../assets/galaxy_a32_63gb.png", 'samsung', "Galaxy a32 63GB", 2021, "dark", 3, false, 20),
...
]

I clone and modify nodes with data from each element of an array. But, I am using webpack, and whatever path I try to apply to src attribute of an ...

"../assets/galaxy_a14_32gb.png"
or
"./assets/galaxy_a14_32gb.png"
or
"./galaxy_a14_32gb.png"

Images are not imported in a "dist" folder. Only the image from original tag from . What to do?

about 4 years ago · Santiago Gelvez
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!