imageSizes method

Link imageSizes(
  1. List<String> sizesList, {
  2. bool? removeIf,
})

The imagesize attribute is a sizes attribute that indicates to preload the appropriate resource used by an img element. Read more...

Implementation

Link imageSizes(List<String> sizesList, {bool? removeIf}) {
  if (removeIf != true && node.attrs != null) {
    VirtualAttr attr =
        VirtualAttr('imagesizes', _html.listToCommas(sizesList));
    node.attrs!.add(attr);
  }
  return this;
}