Program image merge in PHP

I am a big fan of Yahoo recommendations for website acceleration. One recommendation is to combine images where possible to reduce the size and number of requests. However, I noticed that while it’s easy to use CSS sprites for layouts, using other images is not easy to combine. The main example that I think of is a blog or list of articles, where each blog or article also has an image associated with it. These images can significantly affect loading time and page size, especially if they are not optimized. What I'm looking for, in concept or in practice, is a way to dynamically combine these images when they are launched through lossless compression using PHP.

A few added thoughts or concerns:

  • Combining images and generating a dynamic CSS stylesheet to position the backgrounds of images may be one way to do this, but I also worry about accessibility and semantics. As far as I understand, CSS images should be used for layout of elements and the img tag (using alt) should be used for images intended to convey information. I could set the image as the background for the div element and replace the title attribute for alt, but I'm not sure about the accessibility and semantics of the consequences of this.
  • Could the GD library be a good candidate for something like that? Can you recommend other options?
+3
source share
2

, . , , , , , .

: , 10 . , . , 10 . .

  • , , 10 .
  • , .

, # 1, . , , , "SQL"? 10 , , . , , ? .

RSS, Google Reader? , , , , , . ( Google Reader, , RSS, Reader)

, . , .

, , , GD - .

+7

, . , . , , , "" - CSS , , .

, GD, , . GD , , .

+1

All Articles