New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image height tag removed when image is embedded #700

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

Comments

Projects
None yet
1 participant
@GoogleCodeExporter
Copy link

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

BTW, this is a regression from 1.2.24.1 .

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

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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

  • Added labels: Milestone-v29, release-note
@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 6, 2015

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 join this conversation on GitHub. Already have an account? Sign in to comment