Repository navigation
v4.2.0
Minor update: useImage now reports the loaded image’s intrinsic size.
useImagereturns a newnaturalSizefield with{ width, height }read from the image’snaturalWidth/naturalHeightonce it loads.naturalSizeisnullwhile loading, after an error, or for an emptysrc.- When
src, retry options, orretry()trigger a reload,naturalSizeresets in the same render asloading, ensuring a previous image’s size is never reported for the next one. - No new option is added, and all existing return values remain unchanged.
What's Changed
- ci: drop gitmoji from bot-generated commits and PR titles by @pjb0811 in #206
- ci: cap the changeset draft bot at a minor bump by @pjb0811 in #208
- docs: point the AGENTS.md hook example at an existing file by @pjb0811 in #209
- feat(hooks): report the loaded image's natural size from useImage by @pjb0811 in #211
- chore: version packages by @github-actions[bot] in #212
Full Changelog: v4.1.0...v4.2.0