Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

image height tag removed when image is embedded #700

Closed
GoogleCodeExporter opened this issue Apr 6, 2015 · 12 comments
Closed

image height tag removed when image is embedded #700

GoogleCodeExporter opened this issue Apr 6, 2015 · 12 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed state: RequestClarification

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

BTW, this is a regression from 1.2.24.1 .

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

@GoogleCodeExporter
Copy link
Author

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

@GoogleCodeExporter
Copy link
Author

This issue had been fixed in Revision: r2896. 

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

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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

  • Added labels: Milestone-v29, release-note

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

Issue 723 has been merged into this issue.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant