Vue picture path problem

I used the background-image attribute in sass and referenced several images in the same way. The image storage paths are all under assets/images/, some are rendered in the foreground / static/img/, some are in base64 format, why?

Feb.17,2022

whether you packaged it with vue-cli , this tool will replace the resource path (you can change it in the configuration file, please refer to the documentation for details).

as for the path change base64 , it should be the compress resource switch of what plug-in or something you have (I don't know whether vue-cli has this function or whether it is enabled by default). After all, the direct output of small images BASE64 can reduce the number of resource requests to reduce traffic pressure.


Images placed under assets will be compiled by webpack, while files placed under static will not be compiled

in fact, this should belong to the difference between src folder and static folder


base64 is made by vue scaffolding. How many files smaller than this will be converted to base64,? if you remember correctly, it should be 8kb

.
Menu