Skip to content

browser

Utilities in the browser category.

  • isInteractiveElement — Determines whether an element is interactive or contained within an interactive element.
  • loadImage — Loads an image from a given source URL with optional configuration.
  • scaleImageByAspectRatio — Scales an image to a target width or height while preserving its aspect ratio.
  • shrinkImage — Shrinks an image by limiting its maximum dimensions and optionally reducing output quality.
  • shrinkImageElement — Shrinks an image element and returns a new HTMLImageElement with the optimized result.
  • shrinkImageFile — Shrinks an image file before upload by limiting its maximum dimensions and optionally reducing output quality.