-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)feat: assetsRelated to the Assets feature (scope)Related to the Assets feature (scope)pkg: astroRelated to the core `astro` package (scope)Related to the core `astro` package (scope)
Description
Astro Info
Astro v5.13.8
Vite v6.3.6
Node v22.13.0
System Linux (x64)
Package Manager npm
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
All
Describe the Bug
During build I you have
src/
imgs/
folder1/
image.webp
folder2/
image.webp
Both image.webp are exaclty the same
In my code I use some image but in different components with <img src={img.src} />
or with background url as inlined css
During build, the image will be optimized only once
▶ /_astro/image.CbqfUwcl_Zmidpi.webp (reused cache entry) (+3ms) (15/34)
but in the code both image will not have the correct filename
<img src="/_astro/image.CbqfUwcl_Zmidpi.webp" ....
...background-image: url(/_astro/image.CbqfUwcl.webp);...
What's the expected result?
In the code both link should be correct and link to the image
Note: if i change the image it does not happen
cannot reproduce on stackblitz
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-hqqzmlsc-bw3vqhnu
Participation
- I am willing to submit a pull request for this issue.
Metadata
Metadata
Assignees
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)feat: assetsRelated to the Assets feature (scope)Related to the Assets feature (scope)pkg: astroRelated to the core `astro` package (scope)Related to the core `astro` package (scope)