Created
November 3, 2010 13:29
-
-
Save while0pass/661069 to your computer and use it in GitHub Desktop.
1px transparent gif image base64 encoded within data scheme url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== | |
<img width="1" height="1" title="" alt="" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" /> |
try it, it is a 1px x 1px gif with a 1bit palette, created with gimp and encoded with base64 tool in linux.
That's great. Thank you. It seems there was lot of unnecessary metadata in the image, because new base64 is a discontinuous substring of the previous one. Thank you once again.
This is smaller
data:image/gif;base64,R0lGODlhAQABAAAAACw=
@HazemNoor - that shorter one seems to leave a placeholder border on some browsers and mobile devices. (even with all border CSS attributes set to none)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If this short base64 representation for 1px transparent gif is valid, it is far more better. bjrke, if it is really valid, could you explain why or give some reference to read. thank you in advance