Title: CSS Sprite Generator for Thumbnails
Last modified: August 20, 2016

---

# CSS Sprite Generator for Thumbnails

 *  [jschleuss](https://wordpress.org/support/users/jschleuss/)
 * (@jschleuss)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/css-sprite-generator-for-thumbnails/)
 * I have a big list of posts displayed as rows in a table. The first column of 
   each row is the post’s featured image or post thumbnail.
 * I’m up to 416 posts and the HTTP requests are slowing the load time of my pages.
 * Here’s my site:
    [http://www.crystalbridgescollection.com/](http://www.crystalbridgescollection.com/)
 * Any ideas on how to generate a new css sprite for all post thumbnails after a
   new post is added? I’d like it automated as much as possible.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [FMarion](https://wordpress.org/support/users/fmarion/)
 * (@fmarion)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/css-sprite-generator-for-thumbnails/#post-2668220)
 * Just off the top of my head: you might create the sprite image in Photoshop or
   your favourite image editor and use a custom field for the coordinates, and embed
   those coordinates in an inline style tag using the values of said custom field.
 *  Thread Starter [jschleuss](https://wordpress.org/support/users/jschleuss/)
 * (@jschleuss)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/css-sprite-generator-for-thumbnails/#post-2668474)
 * That would work if I only had a few posts. But I’d have about 400 images and 
   400 sets of coordinates to input by hand. I don’t have time to do all that. I’d
   like to figure out a way to have it built in PHP and run whenever a new post 
   is created.
 * In non-code terms this is what I’m trying to figure out:
 *     ```
       when a new post is published run:
       loop through all posts
       if (post has thumbnail) { add post thumbnail to image sprite, copy coordinates inside sprite }
       end loop
       append css for sprite coordinates, clear css browser cache
       ```
   
 * As an alternative, I’m also just trying to figure out how to speed up my page
   load time for the homepage and all image-populus pages. I currently average 4.25
   seconds for the homepage to load.
 *  [Bill Dennen](https://wordpress.org/support/users/xyzzy/)
 * (@xyzzy)
 * [14 years ago](https://wordpress.org/support/topic/css-sprite-generator-for-thumbnails/#post-2668557)
 * Maybe you could use Infinite Scroll?
 * [http://www.infinite-scroll.com/](http://www.infinite-scroll.com/)
 *  [Denis Leblanc](https://wordpress.org/support/users/snapsize/)
 * (@snapsize)
 * [14 years ago](https://wordpress.org/support/topic/css-sprite-generator-for-thumbnails/#post-2668558)
 * Have you considered limiting the amount of posts per page to something like 10-
   20 posts instead of all 400?
 *  [krang](https://wordpress.org/support/users/krang/)
 * (@krang)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/css-sprite-generator-for-thumbnails/#post-2668582)
 * I would recommend looking at the jQuery Lazy Load plugin.
    [http://www.appelsiini.net/projects/lazyload](http://www.appelsiini.net/projects/lazyload)
 * The thumbnails only load once they are in view. This way you aren’t loading 400
   in one go.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘CSS Sprite Generator for Thumbnails’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [table](https://wordpress.org/support/topic-tag/table/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 5 participants
 * Last reply from: [krang](https://wordpress.org/support/users/krang/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/css-sprite-generator-for-thumbnails/#post-2668582)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
