Lofesa commented on a change in pull request #1899: data-srcset in img and
amp-img
URL:
https://github.com/apache/incubator-pagespeed-mod/pull/1899#discussion_r297135990
##########
File path: net/instaweb/rewriter/image_rewrite_filter.cc
##########
@@ -2136,13 +2136,18 @@ void ImageRewriteFilter::StartElementImpl(HtmlElement*
element) {
}
BeginRewriteImageUrl(element, attributes[i].url);
- }
-
- if (element->keyword() == HtmlName::kImg) {
+
+
HtmlElement::Attribute* srcset = element->FindAttribute(HtmlName::kSrcset);
+ HtmlElement::Attribute* datasrcset =
element->FindAttribute(HtmlName::kDataSrcset);
Review comment:
chnaged and added an alternative to the double if
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services