@Override protected final String replaceImageUrl(final String cssUri,final String imageUrl){
  if (!imageUrls.contains(imageUrl)) {
    imageUrls.add(imageUrl);
    return super.replaceImageUrl(cssUri,imageUrl);
  }
  LOG.debug("duplicate Image url detected: '{}', skipping dataUri replacement",imageUrl);
  return imageUrl;
}

@ Override protected final String replaceImageUrl ( final String cssUri , final String imageUrl ) { if ( ! imageUrls . contains ( imageUrl ) ) { imageUrls . add ( imageUrl ) ; return super . replaceImageUrl ( cssUri , imageUrl ) ; } LOG . debug ( "duplicate Image url detected: '{}', skipping dataUri replacement" , imageUrl ) ; return imageUrl ; }
replace provided url with the new url if needed .
