cdowdy / boltbetterthumbs

Bolt Extension for thumbnails, srcset and picture element using Glide
6 stars 2 forks source link

Missing Sizes attribute fallsback to config name #42

Closed cdowdy closed 7 years ago

cdowdy commented 7 years ago

a config with a missing sizes attribute doesn't fallback to the default of 100vw. It fallsback to the named config.

Example:

waterMarkedIMG:
  widthDensity: 'w'
  modifications:
    small:
      w: 200
      fit: 'crop'
      mark: 'bthumb-watermark.png'
      markw: '30w'
      markpos: center
    medium:
      w: 350
      fit: 'crop'
      mark: 'bthumb-watermark.png'
      markw: '30w'
      markpos: center
    large:
      w: 500
      fit: 'stretch'
      mark: 'watermark.png'
      markw: '30w'
      markpos: center
    1_large:
      w: 650
      fit: 'stretch'
      mark: 'watermark.png'
      markw: '30w'
      markpos: center

produces:

<img sizes="waterMarkedIMG"
     srcset="srcset candidates"
     src="src candidate"
     alt="alt text provided">