From 32729423bddc476b0b8fa8101c26fbaad8c554bd Mon Sep 17 00:00:00 2001 From: Patrick Hulce Date: Mon, 23 Jan 2017 11:26:06 -0800 Subject: [PATCH] update feedback --- lighthouse-core/audits/dobetterweb/uses-responsive-images.js | 2 +- lighthouse-core/gather/gatherers/image-usage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lighthouse-core/audits/dobetterweb/uses-responsive-images.js b/lighthouse-core/audits/dobetterweb/uses-responsive-images.js index 0d0fb52833b8..95308655ed0b 100644 --- a/lighthouse-core/audits/dobetterweb/uses-responsive-images.js +++ b/lighthouse-core/audits/dobetterweb/uses-responsive-images.js @@ -40,7 +40,7 @@ class UsesResponsiveImages extends Audit { category: 'Images', name: 'uses-responsive-images', description: 'Site uses appropriate image sizes', - helpText: 'Image sizes served should be based on the display size to save network bytes. ' + + helpText: 'Image sizes served should be based on the device display size to save network bytes. ' + 'Learn more about [responsive images](https://developers.google.com/web/fundamentals/design-and-ui/media/images) ' + 'and [client hints](https://developers.google.com/web/updates/2015/09/automating-resource-selection-with-client-hints).', requiredArtifacts: ['ImageUsage', 'ContentWidth'] diff --git a/lighthouse-core/gather/gatherers/image-usage.js b/lighthouse-core/gather/gatherers/image-usage.js index e34ea01bfe5e..d4779f3009d5 100644 --- a/lighthouse-core/gather/gatherers/image-usage.js +++ b/lighthouse-core/gather/gatherers/image-usage.js @@ -36,7 +36,7 @@ function collectImageElementInfo() { const relativeUrls = entries.map(entry => entry.trim().split(' ')[0]); return relativeUrls.map(url => { try { - return new URL(url, window.location.href).href; + return new URL(url, document.baseURI || window.location.href).href; } catch (e) { return url; }