Chapter 58: getImageDimensions()
Core Idea
_Part of the @remotion/media-utils package of helper functions. Available from v4.
Key Concepts
- Arguments
- src
- Return value
- width
- height
- Example
- Caching behavior
- See also
Code Examples
const {width, height} = await getImageDimensions('https://example.com/remote-image.png');
console.log(width, height);
- What it demonstrates: Usage pattern for getImageDimensions() from the official docs.
Key Takeaways
- Understand arguments when working with getImageDimensions().
- Understand src when working with getImageDimensions().
- Understand return value when working with getImageDimensions().
- Understand width when working with getImageDimensions().
- Understand height when working with getImageDimensions().
Connects To
- Cancel Render: related page in the Hooks & Data APIs section.
- Continue Render: related page in the Hooks & Data APIs section.
- Data Fetching: related page in the Hooks & Data APIs section.