After the vue project is packaged and run, it does not display img, to check that there is no error in the img address, but when the console img obtains the address, it will add the routing path to it. Why? Looking for a solution?

problem description

A simple vue project made by myself, the picture shows normally during the test, visit / content/10, does not display the picture after the package is finished and run with http-server, and it is no problem to right-check the image address, but the console shows the image acquisition address to add the routing path to it! What"s going on?

static

config"./"

utils.jspublicPath

routing code

import Vue from "vue"
import Router from "vue-router"
import Index from "@/page/index"
import Content from "@/page/content"
Vue.use(Router)

export default new Router({
    mode: "history",
      routes: [
    {
        path: "/",
        name: "Index",
        component: Index
    },
    {
        path: "/content/:id",
        name: "Content",
        component: Content
    }
  ]
})

part of the content.vue code

<div>
    <Header :title="content"></Header>
    <img src="../../static/image/2.jpg" alt="">
    <Footer></Footer>
</div>

Feb.24,2022

your assetsPublicPath is . / . The final address generated is the address that starts with . / . Of course, look for

based on the current browser address.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e48d4c-44ce5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e48d4c-44ce5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?