diff --git a/CHANGELOG.md b/CHANGELOG.md index 933e877..82946b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.8 - 2018-05-29 + +* Use imgix auto=format for automatic webp conversion + ## 0.2.7 - 2018-05-25 * Update slugify() util function to support plural initialisms diff --git a/src/util/getImageUrl.js b/src/util/getImageUrl.js index 6f1a0cc..ed6f513 100644 --- a/src/util/getImageUrl.js +++ b/src/util/getImageUrl.js @@ -4,7 +4,7 @@ const resizedDir = '/images/uploads/resized/' const imgixUrl = null // imgix web folder domain e.g. https://example.imgix.net (no trailing slash) const getImgixUrl = ({ path, size }) => - `${imgixUrl}${encodeURI(path)}?w=${size}&fit=max&auto=compress` + `${imgixUrl}${encodeURI(path)}?w=${size}&fit=max&auto=compress,format` const parseFilename = filename => { const parts = filename.match(/(.+)\.([\w]+)$/)