MarkMaunder dot com

timthumb.php fix for blogs.dir directory on WordPressMU

If you’re using timthumb in your wordpress theme on WordPressMU and it’s not finding certain files, this may be why:

WordPressMU uses the blogs.dir directory to store uploads. timthumb’s search routine when looking for images to resize doesn’t include this directory.

Here a modified version I created that does include the dir:

https://markmaunder.com/timthumb.txt

You will need to add the following query param to all your timthumb.php URL’s when using this version:

blogid=<?php echo get_current_blog_id(); ?>

That way timthumb knows which blogs.dir directory to look in for images.

One Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

My name is Mark Maunder. I've been blogging since around 2003 when I started on Movable Type and ended up on WordPress which is what I use to publish today. With my wife Kerry, I'm the co-founder of Wordfence which protects over 5 million WordPress sites from hackers and is run by a talented team of 36 people. I'm an instrument rated pilot and I fly a Cessna 206 along with a 1964 Cessna 172 in the Pacific Northwest and Colorado. I'm originally from Cape Town, South Africa but live in the US these days. I code in a bunch of languages and am quite excited about our emerging AI overlords and how they're going to be putting us to work for them.