The WordPress Hack I Dream Of
I have liked almost every improvement made in WordPress since version 2.1, with two huge, glaring exceptions.
Since many people before me already grumbled and complained about the autosave and revisions updates that initially caused more problems than they resolved, and since I was able to find a solution to it quickly, it wasn’t so big of an issue with my sites. For anyone not familiar with the problem, let’s just say that revisions and podpress do not play well together, and since podcasts are an integral part of my other work, I needed revisions to die quietly, like so many others also did.
The other glaring exception to my love of WordPress was the addition of the “feature” that automatically creates thumbnails from images uploaded through the WordPress media manager. I haven’t noticed any public grumbling about that feature, so I may be alone on this one.
Several of the sites I maintain have a lot of images accompanying them, and they have or use custom image thumbnails that we create for the category and front page listings. The fun part is that we use different images for the thumbnails than we do for the image in the body of the articles, and I think it makes things looks better.
The thumbnails also appear in two different sizes, depending on if it’s being viewed from the main page or the category page, and that’s done with timthumb on one site, and the use of CSS/HTML on another.
The best part about using both methods for the resizing meant I didn’t have to worry about needing several versions of a single image in different sizes… upload one image, and the scripting in the right section of the theme takes care of the resizing where necessary.
Somewhere along the line in the growth of WordPress, the automatic creation of thumbnails for images was added. It happened after I upgraded a few sites in either January or February 2007, so I’m guessing that had to have been included in the release Wordpress 2.1.
I never used the images created from the new thumbnails feature, so I never paid much attention to it… until version 2.5.1 came out.
First, I noticed when the mysqldump backups of that site grew from 20Mb to 50Mb far faster than it had grown from 10Mb to 20Mb. At first, I thought it was from the rapid increase in comments the site was receiving, from a few hundred to a few thousand a week (along with the crazy increase in spam comment attacks… thank you Akismet!)
But I also noticed that the site was taking up a lot more space on the server, and the only explanation for that was an increase in uploaded media. At first, I thought we’d added a lot more video to the site, but I knew it wasn’t enough to account for such a big jump.
When I realized that the month folders in the uploads directory were now much larger in size than a few months before, I poked around. When I noticed that there were now 3 “versions” of every image that was uploaded for an article, instead of the previous original plus generated thumbnail, I was not amused.
I honestly don’t need WordPress to automatically create two thumbnails for every image I upload. Instead, what I need to do these days is go through my uploads every few months and manually delete those thumbnails. That’s cleaning up a couple hundred files files per folder that I didn’t need created in the first place.
Applications shouldn’t have unintended side effects that cause more work, especially not ones as smart and slick as WordPress has become.
There had been an uproar over how many problems with increase in database size and other problems caused by the autosave and the revisions additions that were introduced in WP 2.6, and thank goodness the community came up with immediate workarounds in the forms of adding directives to wp-config.php, and more recently the Post Control plugin.
What I’d really like to see added to WordPress now is the option to turn that thumbnails “feature” off entirely if I want to. Because on almost all of the sites I build and maintain, I really really want to.
I’m not sure yet how much extra space, if any, the references to the thumbnails take up, and my initial thought that the added thumbnails were directly contributing to the huge DB increase might be off base, but I wouldn’t mind seeing if there’d be a way to delete the references to the thumbnails from the database, too.
It’s not vital, but I’d also settle for a quick and dirty mysql command I could run to clean that up, if they’re in there. The database for that one major site grows about 10-12Mb per month. If getting rid of references to thumbnails I don’t use or need can slow that a bit, I’m willing to figure out a way to get that done.






