Skip to content

Commit

Permalink
Allow ability to pass in specific size multipliers
Browse files Browse the repository at this point in the history
  • Loading branch information
kelenakamura authored Jul 16, 2020
1 parent 4472de8 commit 94ca007
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/getFluidGatsbyImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ function getFluidGatsbyImage(image, args = {}) {
}

let sizes = options.sizes || `(max-width: ${maxWidth}px) 100vw, ${maxWidth}px`
let widths = sizeMultipliersFluid
let multipliers = options.multipliers || sizeMultipliersFluid
let widths = multipliers
.map(scale => Math.round(maxWidth * scale))
.filter(width => width < dimensions.width)
.concat(dimensions.width)
Expand Down

0 comments on commit 94ca007

Please sign in to comment.