Instantly share code, notes, and snippets.

Embed
What would you like to do?
1px transparent gif image base64 encoded within data scheme url
data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
<img width="1" height="1" title="" alt="" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" />
@bjrke

This comment has been minimized.

bjrke commented Jul 29, 2011

how about
data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
?

@while0pass

This comment has been minimized.

Owner

while0pass commented Jul 29, 2011

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

@bjrke

This comment has been minimized.

bjrke commented Aug 11, 2011

try it, it is a 1px x 1px gif with a 1bit palette, created with gimp and encoded with base64 tool in linux.

@while0pass

This comment has been minimized.

Owner

while0pass commented Aug 11, 2011

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.

@HazemNoor

This comment has been minimized.

HazemNoor commented Nov 3, 2013

This is smaller

data:image/gif;base64,R0lGODlhAQABAAAAACw=

@mansilladev

This comment has been minimized.

mansilladev commented Nov 25, 2013

@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