Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets of type webp (image) are not copied by build #4245

Open
4 tasks done
hschaefer123 opened this issue Oct 2, 2024 · 3 comments
Open
4 tasks done

Assets of type webp (image) are not copied by build #4245

hschaefer123 opened this issue Oct 2, 2024 · 3 comments
Labels
need more info Further information is requested

Comments

@hschaefer123
Copy link

Describe the bug

Tried to use webp images inside src folder.
It seems, that only jpg, png and gif are currently supported!

Reproduction

Just use any kind of image.webp referenced from markdown

Expected behavior

During build, referenced webp image should by copied to site asset folder the same way like png, etc.

System Info

System:
    OS: macOS 15.0
    CPU: (12) arm64 Apple M2 Max
    Memory: 1.93 GB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.16.0 - /opt/homebrew/opt/node@20/bin/node
    Yarn: 1.22.21 - /opt/homebrew/bin/yarn
    npm: 10.8.1 - /opt/homebrew/opt/node@20/bin/npm
    pnpm: 8.6.12 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: 129.0.6668.71
    Safari: 18.0
  npmPackages:
    vitepress: ^1.3.4 => 1.3.4

Additional context

No response

Validations

@hschaefer123 hschaefer123 added the bug: pending triage Maybe a bug, waiting for confirmation label Oct 2, 2024
@brc-dd
Copy link
Member

brc-dd commented Oct 2, 2024

It's working fine for me. Please share a minimal reproducible example.

image

If you're referencing that image from frontmatter then you need to keep it in public directory.

@brc-dd brc-dd added need more info Further information is requested and removed bug: pending triage Maybe a bug, waiting for confirmation labels Oct 2, 2024
@hschaefer123
Copy link
Author

Hi Divyansh,

sorry, but you are right.

I am refering the image from vue instead md in this case i missunderstood,
that only md referenced images will be copied.

I will switch over using /public folder in such cases.

Sorry for that!

Best regards
Holger

@brc-dd
Copy link
Member

brc-dd commented Oct 2, 2024

For vue too it should work fine without moving files to public unless you're using dynamic source.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants