Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@hashicorp-tmp/hashi-image

jescalan30.2.0

super optimized image element, pulls from dato and formats for 7 screen sizes in two formats. Skips optimization for SVGs.

readme

Image

Super optimized image element, pulls from dato and formats for 7 screen sizes in two formats. Skips optimization for SVGs.

Props

  • src (str): url of the image
  • steps (arr): [optional] array of screen sizes to optimize for
  • sizes (str): [optional] same as sizes on an img tag
  • classes (str): [optional] any classes to be added to the image
  • alt (str): [optional] alt text for the image
  • aspect_ratio (arr): [optional] automatically adjusts to aspect ratio, for example [16,9]
  • params (obj): [optional] params passed directly to imgix

Dependents:

  • hero
  • logo-grid
  • nav
  • person-list
  • resource-list
  • text-and-image