Support » Fixing WordPress » What does the ‘wp-image-1234’ class actually do?

  • I’m trying to batter my exisitng WP blog posts into shape so that they’ll work properly with Graph Paper Press’s Modularity. At the moment there’s something kooky happening with thumbnails and I don’t really understand the way the image insertion works. Basically, when I insert an image using the WP interface I get a class that looks like this:
    class="alignleft size-medium wp-image-1006"

    I understand what alignleft does, and I dug around and found references to size-medium in the CSS for my theme. I understand it appears depending on what size you pick in the image insert tool.

    But what does the wp-image-XXXX bit do or refer to? The numbers appear to be different for every image and I can’t work out what the correlation is, or the importance.

    The reason I’m asking is I’m trying to set up Marsedit to do my posts as I really don’t like the idea of needing an internet connection to post. I’ve been setting up the markup for inserting images and that last little bit of ‘class’ is throwing a spanner in my works. Removing it doesn’t *seem* to make any difference, but I can’t believe it’s there just for pretties. It must have a purpose – what is it?

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The class won’t do anything at all unless you add something in your stylesheet that uses it. The trailing number is the ID of the image’s reference information in the wp_posts table.

    So if I upload images directly via ftp (which I prefer as it’s far faster) WordPress won’t have any reference to them in the wp_posts table correct?

    Are there any potential problems with not having the images referenced?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘What does the ‘wp-image-1234’ class actually do?’ is closed to new replies.