Capítulo 58 de 988

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

  1. Understand arguments when working with getImageDimensions().
  2. Understand src when working with getImageDimensions().
  3. Understand return value when working with getImageDimensions().
  4. Understand width when working with getImageDimensions().
  5. 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.