@quintype/components 3.5.3-fix-image-sizes.2 → 3.5.3-fix-image-sizes.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -1978,6 +1978,7 @@ function GumletImage(props) {
1978
1978
  reactTag = props.reactTag,
1979
1979
  className = props.className;
1980
1980
  var image = new quintypeJs.FocusedImage(slug, metadata);
1981
+ var imageWidths = [250, 480, 640];
1981
1982
 
1982
1983
  function generatePath(size) {
1983
1984
  return "//" + imageCDN + "/" + image.path(aspectRatio, Object.assign({
@@ -1992,7 +1993,7 @@ function GumletImage(props) {
1992
1993
  var imageProps = {
1993
1994
  src: emptyWebGif__default["default"],
1994
1995
  "data-src": "https://" + imageCDN + "/" + image.path(aspectRatio, imgParams),
1995
- srcSet: props.widths ? props.widths.map(function (size) {
1996
+ srcSet: imageWidths ? imageWidths.map(function (size) {
1996
1997
  return "".concat(generatePath(size), " ").concat(size, "w");
1997
1998
  }).join(",") : undefined,
1998
1999
  sizes: generateSizes(),
@@ -40,6 +40,7 @@ export function GumletImage(props) {
40
40
  reactTag = props.reactTag,
41
41
  className = props.className;
42
42
  var image = new FocusedImage(slug, metadata);
43
+ var imageWidths = [250, 480, 640];
43
44
 
44
45
  function generatePath(size) {
45
46
  return "//" + imageCDN + "/" + image.path(aspectRatio, Object.assign({
@@ -54,7 +55,7 @@ export function GumletImage(props) {
54
55
  var imageProps = {
55
56
  src: emptyWebGif,
56
57
  "data-src": "https://" + imageCDN + "/" + image.path(aspectRatio, imgParams),
57
- srcSet: props.widths ? props.widths.map(function (size) {
58
+ srcSet: imageWidths ? imageWidths.map(function (size) {
58
59
  return "".concat(generatePath(size), " ").concat(size, "w");
59
60
  }).join(",") : undefined,
60
61
  sizes: generateSizes(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/components",
3
- "version": "3.5.3-fix-image-sizes.2",
3
+ "version": "3.5.3-fix-image-sizes.3",
4
4
  "description": "Components to help build Quintype Node.js apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.js",