firstred / page-speed

Automatically exported from code.google.com/p/page-speed
0 stars 0 forks source link

It's better to scale duplicate images than download other thumbnails #104

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?  If possible, include the full Url
of any web page you see a problem on.
1. Have one <img> on the page that is e.g. 400x200
2. Have another <img> pointing at the same url (i.e. using the same cached
file as #1), but this one is rescaled 200x100.
3. This is better performance than downloading a separate 200x100 image for
just the thumbnail. But Page Speed says it's unoptimized.

What is the expected output? What do you see instead?
-should show no error

What version of Firefox are you using?  From the 'Help' menu, select 'About
Mozilla Firefox' to get the version.
3.5.1

What version of Firebug are you using?  From the 'Tools' menu, select 'Add-
ons', and click on 'Extensions'.  Firebug and its version should be listed.
1.4.1

What version of Page Speed are you using?  Follow the procedure to get the
Firebug version, and look for 'Page Speed' in the list of extensions.
1.0.1.1

What operating system are you using?
OS X

Please provide any additional information below.

Original issue reported on code.google.com by jalen...@gmail.com on 30 Jul 2009 at 9:23

Attachments:

GoogleCodeExporter commented 9 years ago
Good point.  Will fix.

Sam

Original comment by sker...@google.com on 30 Jul 2009 at 9:35

GoogleCodeExporter commented 9 years ago
To fix this issue, the code in 
src/pagespeed_firefox/js/pagespeed/imageCompressionLint.js needs to be changed 
to 
not warn that an image is resized, if the same image is used without resizing 
on the 
same page.

Sam

Original comment by sker...@chromium.org on 18 Nov 2009 at 3:44

GoogleCodeExporter commented 9 years ago
The code is supposed to handle this. We track the largest instance of an image 
on the 
page.

For instance, if there are 2 uses of http://www.foo.com/a.png and the first is 
scaled 
to 10x10 and the second is the natural size of the image (not scaled), we 
should not 
penalize. Perhaps there is a bug in the current image optimization code that is 
not 
doing this correctly.

See http://code.google.com/p/page-
speed/source/browse/firefox_addon/trunk/src/pagespeed_firefox/js/pagespeed/image
Compr
essionLint.js#91 for the code that is supposed to handle this.

Can we first find a reproducible case to verify that there really is a bug? The 
attached screenshot shows that it isn't working but there is no URL included so 
it's 
not possible to reproduce (and not possible to verify a fix).

Original comment by bmcqu...@google.com on 25 Nov 2009 at 1:03

GoogleCodeExporter commented 9 years ago
It is likely that this has been fixed with 

r394 | avd@google.com | 2009-12-07 14:30:09 -0500 (Mon, 07 Dec 2009) | 4 lines

Split image compression and html image scaling into 2 rules.

But we still need a good test case.

Original comment by jglasgow@google.com on 8 Dec 2009 at 10:33

GoogleCodeExporter commented 9 years ago

Original comment by mdste...@google.com on 25 Jan 2010 at 6:19

GoogleCodeExporter commented 9 years ago
thanks femtomatt :) :) :)

Original comment by jalen...@gmail.com on 25 Jan 2010 at 6:22