Hacker News new | past | comments | ask | show | jobs | submit login

> "My images are inlined into the HTML using the base64 image tool, so there is no need for the browser to go looking for some image linked to as an external file."

This does not work in most cases when you use big images. From StackOverflow answer [1]: "It's only useful for very tiny images. Base64 encoded files are larger than the original. The advantage lies in not having to open another connection and make a HTTP request to the server for the image. This benefit is lost very quickly so there's only an advantage for large numbers of very tiny individual images. "

[1] - http://stackoverflow.com/questions/11736159/advantages-and-d...




  > This benefit is lost very quickly so there's only an advantage
  > for large numbers of very tiny individual images.
In which case maybe it would be better to use sprites?


I don't know, I hate dealing with sprites, it just not worth it in my opinion, the time you spent on every edit...


If you're using photoshop you can create a PSD that sources other PSDs and if I remember right create an action that generates the exported image so you could automate things quite a bit if not entirely.


Furthermore the image used is one that compresses uncommonly well with PNG (small palette, large chunks of solid color). I think the vast majority of 350x400 images would be at least 10x larger unless they're deliberately composed in a similar style or are JPEGs with the quality turned way down.

I tried to create an SVG version to see how an SVGZ would compare, but evidently I'm too crap at Inkscape and kept screwing it up.


> Base64 encoded files are larger than the original.

This is one of the reasons to discourage using large attachments on emails (which then stick around forever).




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: