My favorites | Sign in
Project Home Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 41: ImageMe
4 people starred this issue and may be notified of changes. Back to list
 
Project Member Reported by stevesou...@gmail.com, Sep 9, 2009
We could do something similar to SpriteMe for image optimization. 

  - ImageMe finds all the images in the page (both IMG images as well as
CSS background images). 
  - ImageMe sends the list of image URLs to coolRunnings. 
  - CoolRunnings fetches each image and optimizes it. This has to be
lossless - so it's okay to change image format, but not at loss of quality. 
  - CoolRunnings returns a JSON structure that has the list of original
image URLs. For each image URL there is the original size, the coolRunnings
optimized image URL, and the optimized size. (Even if the optmized size is
greater than the original size - leave it to the client to deal with this.)
What about removing JPG comments?
  - For each improved image, ImageMe swaps it out for the optimized image
URL. Need some logic to determine "improved" - saving 5 bytes on a 50K file
isn't worth it. 

Thoughts?
Sep 14, 2009
Project Member #1 jaredhir...@yahoo.com
It seems natural to run this as a second step, after running SpriteMe. In fact, the
images marked 'bad candidates'/'already sprited' by the SpriteMe logic would be
exactly the images we'd want to optimize.

Retaining comments (copyright info and possibly SpriteMe sprite-maintenance comments)
is definitely necessary. I'll have to look into the particular tools for different
image formats, to see which ones have comments-related options. *Worst* case, we can
use PHP Imagick to fetch the comments, then optimize the image, then reinsert
comments. coolRunnings used to do this because smush.it clobbered PNG comments.

Aside from adding code to optimize image types other than PNG, and a little 'action
controller'-type glue script to translate between the optimization classes and the
request/response, we can pretty much use existing materials.
Oct 29, 2009
#2 sergey.c...@gmail.com
http://www.gracepointafterfive.com/punypng does a really good job on coolrunnings
results - I tested it on resulting sprites and some increase in size is of spriting
almost completely illuminated by punipng.
Feb 7, 2010
#3 shika...@gmail.com
Would it be possible to use this proposed ImageMe service to not just optimize 
images, but also to add and convert <img> to sprites?

I can see a lot of issues with it but when I optimized my websites beyond what 
spriteme could help with, I found a lot of leftover <img> tags that should be handled 
by an advanced service like this. Convert them to a similar tag (although leaving 
<img> and just emptying the src attribute could work too) and add the sprite as the 
background image with correct position.

The icons I found were generally things like website logo in the header, search icon 
next to the search bar, rss/twitter icon in the footer. I think these are general 
enough issues to make it possibly worth it for a wide range of users.

Powered by Google Project Hosting