Skip to content

Commit

Permalink
fix: set progressive jpg parameter only when format is forced to jpg
Browse files Browse the repository at this point in the history
  • Loading branch information
axe312ger committed Jan 15, 2021
1 parent 55c9261 commit 9b10c00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/gatsby-source-contentful/src/extend-node-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ const createUrl = (imgUrl, options = {}) => {
const urlArgs = {
w: options.width || undefined,
h: options.height || undefined,
fl: options.jpegProgressive ? `progressive` : undefined,
fl:
options.toFormat === `jpg` && options.jpegProgressive
? `progressive`
: undefined,
q: options.quality || undefined,
fm: options.toFormat || undefined,
fit: options.resizingBehavior || undefined,
Expand Down

0 comments on commit 9b10c00

Please sign in to comment.