astro-imagetools
astro-imagetools copied to clipboard
Pitcture's image src attribute should have a file extension
The src
attribute in the img
tag generated by the Picture
component doesn't have a file extension. This is incorrect.
<img src="./assets/[email protected]" srcset="./assets/[email protected]" >
The astro code is:
<Picture src="/src/images/test.png"
alt=""
format={["avif", "webp" , "jpeg" ]}
fallbackFormat="jpeg"
includeSourceFormat={false}
formatOptions={{ jpg: { quality: 100}, webp: { quality: 100, }, avif: { quality: 90 }}}
width={200} />
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attr-src
I have the same problem with images in MD files: https://github.com/ApptivaAG/gaston-webpage/blob/4ee4cfeee1a1ad1b879ff96ad36d06fb48d8e5eb/src/pages/en/blog/update-2022-q1/index.md?plain=1#L21 (Markdown) -> https://gastonsolution.com/en/blog/update-2022-q1/ (rendered)