Avatar for the withastro user
withastro
astro
BlogDocsChangelog

Performance History

Latest Results

Fix/16633 noimagemetadata for svg with either zero height or width (#16681) * test: when dimmension is 0 * allow svg impoerts with zero dimmention * fix(assets): treat SVG width/height of zero as valid dimensions When an SVG has explicit width="0" or height="0" attributes, the image metadata extraction threw a NoImageMetadata error because both check sites used JavaScript truthiness tests where 0 is falsy. In vendor/image-size/types/svg.ts, the calculate() function fell through the explicit-dimensions path when either dimension was 0 and then hit the TypeError('Invalid SVG') throw. In assets/utils/metadata.ts, the post-probe guard also rejected 0 via the !result.height || !result.width condition. Using 0 for width/height is a valid and recommended pattern for SVG filter containers that should be hidden from screen readers: <svg width="0" height="0" aria-hidden="true"></svg> Fix: change both truthiness checks to null checks so that 0 is accepted as an explicit dimension while null/undefined still signal a missing value. Fixes #16633 * chore: add changeset for SVG zero-dimension fix * fix indentations in test file --------- Co-authored-by: fkatsuhiro <nakayoshiryutokatsu@gmail.com> Co-authored-by: OfirHaf <ofir135001@gmail.com>
main
6 minutes ago
Review comments
advanced-routing-types
3 hours ago
Remove useless URL
ocavue-forks:ocavue/img-test
5 hours ago
Merge branch 'main' into ocavue/img-test
ocavue-forks:ocavue/img-test
5 hours ago
Merge branch 'main' into advanced-routing-types
advanced-routing-types
6 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
Extract Vite build config assembly into testable function#16741
32 minutes ago
51f48f3
vite-build-config-extract
CodSpeed Performance Gauge
0%
3 hours ago
3655b4d
advanced-routing-types
CodSpeed Performance Gauge
0%
5 hours ago
771537f
ocavue-forks:ocavue/img-test
© 2026 CodSpeed Technology
Home Terms Privacy Docs