After Vue-cli is packaged, the picture is always loaded from the root directory of the server.

pictures are always loaded from the root directory of the server

clipboard.png

clipboard.png

I don"t know where

was omitted when packing.
Mar.16,2021

  1. check the path configuration in config;
  2. if you can't solve it, use the absolute address, just use the address of the image resource uploaded to the server.

{
  test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
  loader: 'url-loader',
  options: {
     limit: 10000,
     name: utils.assetsPath('img/[name].[hash:7].[ext]'),
     outputPath: process.env.NODE_ENV === 'production' ? '../' : ''
    }
 },

you can try to modify outputPath: process.env.NODE_ENV = 'production'?'.. /':'


problem solved. Mainly my pictures were placed in this static directory

.

clipboard.png

clipboard.png
src/assets webpack

clipboard.png

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-1e5009d-4509b.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-1e5009d-4509b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?