You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment this is kinda intended, to be on the safer side regarding keeping images that might be needed. I think it would be possible to just limit it to src though.
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
<Image>
generates unused original images only when reading its property (like.width
).Example
See the StackBlitz that is created from the empty project template.
Whether or not
<Image>
generates the original image depends on whether or not the.width
property is read.The following code generates the original image.
The following files are generated in the
dist/_astro
directory.sample.DRk6a-UB.png
<- The original image that is unused!!sample.DRk6a-UB_2wRPSH.webp
sample.DRk6a-UB_AXNuM.webp
sample.DRk6a-UB_ZbJNag.webp
Strangely enough, if you delete
${myImage.width}
, the original image is not generated.Related issues?
What's the expected result?
The original image should not be generated in the
_astro
directory because it's never used in HTML.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-jovs8y?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: