crowell / modpagespeed_tmp

Automatically exported from code.google.com/p/modpagespeed
Apache License 2.0
0 stars 0 forks source link

image height tag removed when image is embedded #700

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Source code, in the original file: <img src="2by2.gif" width="100%" 
height="1px" />

Source code, as it shows up in the browser (Chrome, Firefox):
<img 
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQ
VQI12NgmMkAAAE2AJohB6IfAAAAAElFTkSuQmCC" width="100%"/>

What is the expected output? What do you see instead?
<img 
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQ
VQI12NgmMkAAAE2AJohB6IfAAAAAElFTkSuQmCC" width="100%" height="1px" />

What version of the product are you using (please check X-Mod-Pagespeed
header)?
mod-pagespeed-stable-1.3.25.4-2941

On what operating system?
CloudLinux 5.9

Which version of Apache?
httpd-2.2.3-76.el5_9.cloudlinux

Which MPM?
No

URL of broken page:
http://greenupourschools.org/application/index.php?content=application

Original issue reported on code.google.com by stevencr...@gmail.com on 17 May 2013 at 3:26

GoogleCodeExporter commented 9 years ago
Hi,

Note that data-URL's data is resized to 1x1, even though 2by2.gif might have 
originally been 2x2, it's 1x1 in the base64 so you should get the right display.

How did I find this?

I put the data-URL in the URL bar in Chrome, then did save-as to a local .png 
file.  I ran "file x.png" and got:

2x2.png: PNG image data, 1 x 1, 8-bit/color RGB, non-interlaced

I think this is working as intended.  Let me know if there's something 
functional we have lost here.

Original comment by jmara...@google.com on 17 May 2013 at 4:36

GoogleCodeExporter commented 9 years ago
It appears mod-pagespeed is re-writing the HTML code for the image src and 
instead of it being a 1px height line across the page it is a big box the size 
of the parent code. See the attached screenshot of what I and the client is 
seeing.

Original comment by stevencr...@gmail.com on 17 May 2013 at 4:51

Attachments:

GoogleCodeExporter commented 9 years ago
OK there must be some css/sizing inheritance that we are not overriding the 
right way  Would it be possible to share the URL of this page?

Original comment by jmara...@google.com on 17 May 2013 at 5:00

GoogleCodeExporter commented 9 years ago
Ya, here you go:

http://greenupourschools.org/application/index.php?content=application

Original comment by stevencr...@gmail.com on 17 May 2013 at 5:01

GoogleCodeExporter commented 9 years ago
Getting this as well, pretty nasty. In my case the image is contained inside a 
'td' element as well, and also there is little to no CSS styling applied.

The image is 1x1 pixels though.

Original comment by robert.munteanu on 25 May 2013 at 8:52

GoogleCodeExporter commented 9 years ago
BTW, this is a regression from 1.2.24.1 .

Original comment by robert.munteanu on 25 May 2013 at 9:07

GoogleCodeExporter commented 9 years ago

Original comment by jmara...@google.com on 10 Jun 2013 at 6:26

GoogleCodeExporter commented 9 years ago
This issue had been fixed in Revision: r2896. 

Original comment by hui...@google.com on 17 Jun 2013 at 2:34

GoogleCodeExporter commented 9 years ago
I think that the revision is incorrect - r2896 seems to have fixed issue 675. 
Noticed that because I want to cherry-pick the fix.

Original comment by robert.munteanu on 18 Jun 2013 at 9:41

GoogleCodeExporter commented 9 years ago

Original comment by sligocki@google.com on 24 Jun 2013 at 3:04

GoogleCodeExporter commented 9 years ago
r2896 has fixed this issue as well as issue 675. I've patched r2896 to 1.3.25.4 
and verified that the problem is gone.

Original comment by hui...@google.com on 25 Jun 2013 at 6:19

GoogleCodeExporter commented 9 years ago
Issue 723 has been merged into this issue.

Original comment by hui...@google.com on 25 Jun 2013 at 6:22