@hashicorp/hashi-image

1.0.7 • 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 docs
  • steps (arr): [optional] array of screen sizes to optimize for
  • sizes (str): [optional] same as sizes on an img tag docs
  • classes (str): [optional] any classes to be added to the image
  • alt (str): [optional] alt text for the image docs
  • aspect_ratio (arr or str): [optional] automatically crops to aspect ratio. first two items in the array are the ratio (ex. [16,9]), and the third is the base width that images will be cropped to in IE, which doesn't support srcset (ex. [16,9,500]). if string is provided, brackets should be excluded (ex. 16,9,500). string will be converted to array
  • params (obj): [optional] params passed directly to imgix

Dependents:

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.1.1-alpha.00next
1.0.71latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.71
2.1.1-alpha.00
2.1.0-alpha.00
2.0.9-alpha.01
2.0.8-alpha.00
2.0.7-alpha.01
2.0.6-alpha.00
2.0.5-alpha.00
2.0.4-alpha.01
2.0.3-alpha.00
2.0.2-alpha.00
2.0.1-alpha.00
2.0.0-alpha.00
1.0.61
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00
0.3.10
0.3.00
0.2.20
0.2.10

Package Sidebar

Install

npm i @hashicorp/hashi-image

Weekly Downloads

5

Version

1.0.7

License

none

Unpacked Size

4.54 kB

Total Files

3

Last publish

Collaborators

  • gstewart-hashi
  • prestonbourne
  • mikegolus
  • leahmariebush
  • kaitlynnefuery
  • abhishek-hashicorp
  • cameronperera
  • alexju
  • consul-ui-services
  • hashicb
  • britt.lindgren
  • paulhcp
  • nandereck
  • tstormk
  • hashibot-hds
  • lackeyjb1
  • jpogran
  • thrashr888
  • melsumner
  • didoo
  • zchsh
  • hcitsec
  • gregone
  • meirish
  • enmod
  • kaxcode
  • anubhavmishra-hashicorp
  • hashibot-web
  • cstitt-hashi
  • mocohen
  • dhaulagiri