• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

457
Views
In Vue js Image can't find from Node Js server

I have run my Nodejs server in 3000 port and Vuejs 8080 port. Now I can get data from "posts" collection via API but when a want to access image it can't find the image.

My Error is :GET http://localhost:3000/images/1656300140014picture.PNG 404 (Not Found)

               <tbody>
                  <tr v-for="(item, index) in getAllPost" :key="item._id">
                    <td>{{ index + 1 }}</td>
                    <td>
                      
                      <img
                        :src="
                          'http://localhost:3000/images/' + item.postImage
                        "
                        style="width: 50px"
                      />

                    </td>
                    <td v-if="item.author">{{ item.author.userName }}</td>
                    <td v-if="item.author == null">N/A</td>
                    <td>{{ item.title }}</td>

                    <td class="text-right">
                      <router-link
                        :to="{ name: 'mainLayout' }"
                        class="btn btn-primary mr-2"
                      >
                        <i class="fas fa-eye"></i>
                      </router-link>
                      <button class="btn btn-primary mr-2">
                        <i class="fas fa-edit"></i>
                      </button>
                      <button class="btn btn-danger mr-2">
                        <i class="fas fa-trash"></i>
                      </button>
                    </td>
                  </tr>
                </tbody>

enter image description here

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

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error