function isCandidate(image, imageRecord) {
  /** image-rendering solution for pixel art scaling.
   * https://developer.mozilla.org/en-US/docs/Games/Techniques/Crisp_pixel_art_look
  */
  const artisticImageRenderingValues = ['pixelated', 'crisp-edges'];
  // https://html.spec.whatwg.org/multipage/images.html#pixel-density-descriptor
  const densityDescriptorRegex = / \d+(\.\d+)?x/;
  if (image.displayedWidth <= 1 || image.displayedHeight <= 1) {
    return false;
  }
  if (
    !image.naturalDimensions ||
    !image.naturalDimensions.width ||
    !image.naturalDimensions.height
  ) {
    return false;
  }
  // Check the actual mimeType before guessing, since file extension is not guaranteed
  if (imageRecord?.mimeType === 'image/svg+xml') {
    return false;
  }
  if (UrlUtils.guessMimeType(image.src) === 'image/svg+xml') {
    return false;
  }
  if (image.isCss) {
    return false;
  }
  if (image.computedStyles.objectFit !== 'fill') {
    return false;
  }
  // Check if pixel art scaling is used.
  if (artisticImageRenderingValues.includes(image.computedStyles.imageRendering)) {
    return false;
  }
  // Check if density descriptor is used.
  if (densityDescriptorRegex.test(image.srcset)) {
    return false;
  }
  return true;
}
@param {LH.Artifacts.ImageElement} image
@param {LH.Artifacts.ImageElementRecord | undefined} imageRecord
@return {boolean}