preload-webpack-plugin icon indicating copy to clipboard operation
preload-webpack-plugin copied to clipboard

Support imagesrcset and imagesizes

Open valentinoli opened this issue 4 years ago • 0 comments

Are there any plans for supporting imagesrcset and imagesizes attributes for preloading responsive images? Could perhaps be done by adding the following to this line:

if (attributes.as === 'image') {
  const { imagesrcset, imagesizes } = options
  if (imagesrcset) {
    attributes.imagesrcset = imagesrcset
    if (imagesizes) {
      attributes.imagesizes = imagesizes
    }
  }
}

valentinoli avatar Dec 27 '20 21:12 valentinoli