images-responsiver icon indicating copy to clipboard operation
images-responsiver copied to clipboard

Settings not explanation in the tutorial

Open bingqichen opened this issue 3 years ago • 0 comments

Hey, i found some many settings can be override by presets in the source code, but not explanation in the tutorial, i want to know why?

// below settings can be override
const defaultSettings = {
  selector: ':not(picture) > img[src]:not([srcset]):not([src$=".svg"])',
  resizedImageUrl: (src, width) =>
    src.replace(/^(.*)(\.[^\.]+)$/, '$1-' + width + '$2'),
  runBefore: (image) => image,
  runAfter: (image) => image,
  fallbackWidth: 640,
  minWidth: 320,
  maxWidth: 1280,
  steps: 5,
  sizes: '100vw',
  classes: [],
  attributes: {},
};

bingqichen avatar Jul 13 '21 08:07 bingqichen