@hashicorp-tmp/hashi-image

0.2.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @hashicorp-tmp/hashi-image

Weekly Downloads

1

Version

0.2.0

License

none

Last publish

Collaborators

  • jescalan