Skip to content

Image with whitespace won't load from 'public' folder #2195

@AgileInteractive

Description

@AgileInteractive

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

When trying to load an image with whitespace (or other assets) from the 'public' folder, it can't be found.

Reproduction

  • Fresh install of vite, choosing vue
  • Copy image with whitespace in file name to public folder
  • Try to show it with an img element

System Info

  • vite version: 2.0.2
  • Operating System: Windows
  • Node version: 15.9.0
  • Package manager (npm/yarn/pnpm) and version: npm 7.5.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions