Tip for TimThumb (thumb.php) not Generating Thumbnails

This tip is for anyone using TimThumb (aka “thumb.php”) either directly or indirectly via a WordPress theme (WooThemes uses it a lot) and is not having their thumbnails successfully generated.

I have run into this 3x in the last few years and ever time I forget the solution and have to re-find it, so I’m posting it here to help anyone else out running into the same issue.

Here are the juicy tidbits in easy-to-browse-format if you are coming in from Google:

  1. TimThumb is a PHP script used for zooming, cropping and generating thumbnails (typically 100×100 pixels) from images released under a GPL2 license.
  2. You can always download the latest version of the single PHP TimThumb script from here if you need it: http://code.google.com/p/timthumb/source/browse/trunk/timthumb.phpNOTE: Many WordPress themes (and likely others) use TimThumb internally to generate thumbnails (like WooThemes). There is a chance the TimThumb PHP file has been renamed in your install to something like “thumb.php” – double check when updating your copy of TimThumb.
  3. TimThumb uses the PHP-GD extension. If it’s not installed (as always happens with me) your thumbnails will silently fail to be generated.

    Debian TIP:
    apt-get install php5-gd
    CentOS/RedHat/Fedora TIP: ‘yum install php-gd
  4. By default TimThumb reads and writes to the /cache and /temp sub-folders under the directory the PHP script is currently contained in. Your web server will need full read/write access to those two subdirectories.

    Fast-and-Dirty TIP:
    chmod 777 cache‘  and ‘chmod 777 temp
    More Gooder-Betterest TIP:
    Find the user account that your web server runs under (likely ‘apache’ or ‘http’ or ‘www-data’, you can use the ‘top’ command and look at the user-process column for your web server process to see who it runs as) and give full read/write permission to that user to the cache/temp directory so it can use it as it needs it.
  5. Reader ridhoyp wanted to know how to configure TimThumb to resize images from a different domain (e.g. static.mydomain.com and mydomain.com), fortunately he found the solution online already.

NOTE: Many people have reported problems with their wp-content folder or timthumbs.php script itself are ‘chmod 777’, try using ‘chmod 755’ instead if you are still having problems.

And that should do it — if you are running into more complicated issues like the PHP script failing to even execute you might have a setup problem. Post a comment and I’ll see if I can help.

Update #1: A tip from reader Jeff is to use ‘chmod 755‘ instead of 777 as using 777 can cause problems with some server’s security settings (too open to trust).

, , , , , , , , ,

291 Responses to Tip for TimThumb (thumb.php) not Generating Thumbnails

  1. David June 21, 2010 at 7:27 am #

    I have been trying to fix this exact problem for days and nothing I have found online is working. I too am a html guy not a php programmer so while I can get my hands dirty, I also get stuck all too often.

    I purchased wp university theme which is timthumb heavy and I cannot get the script to work even to display the default image. I also DO NOT have wordpress loaded at the root but rather in a wordpress folder at the root. Would that have anything to do with the issues? If not where do I begin with fixing this mess?

    The folder permissions are fine, the hosting company was called and GD is installed. I also asked if the timthumb.php script was blacklisted and they said no.

    Where do I go from here? Too many themes use this so I feel like I have to find a solution.

    wp version – 2.9.2

    site: http://www.choke-lahoma.com/wordpress

    • Riyad Kalla June 21, 2010 at 7:37 am #


      I’ll see if I can help — do you have root access to this box or can you only admin it through a web interface?

      Also what is the path that WordPress is installed to? (it isn’t that important, but it gives me context)

      And what is the path where timthumb.php resides?

  2. BillyT3 July 1, 2010 at 6:55 am #

    I had this problem, and it was simply because ‘safe mode’ was enabled in the control panel php settings. hope this helps u too.

    • Arpita February 8, 2012 at 4:32 pm #

      Hi Riyad,

      I see 403 Forbidden error, when I right click on image and click on View image/

      Can you please tell me what is causing it? I have given all the permission as it is specified above and the problem still persist. It is not displaying images at all.

      Here is the URL for the website I am working on:

      Before it was displaying below error in my log:

      [Wed Feb 08 11:19:20 2012] [crit] [client] (13)Permission denied: /home/joolie/public_html/wp-content/themes/fotofolio/scripts/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer:…038;w=480&h=275&zc=1

      Now I see below error:

      Here is the other error I can see in Error log:

      [Wed Feb 08 15:08:21 2012] [error] [client] File does not exist: /home/joolie/public_html/wp-content/themes/fotofolio/scripts/sys_cpanel, referer:…hemes/fotofolio/screenshot.png

      If you can please tell me what is the issue, it will be really helpful.

      Thanks in advance for your help.


      • Riyad Kalla February 16, 2012 at 10:15 am #


        Checking your site I see that the image URLs are invalid; I am not sure if it is your themes fault or if you hand-coded the timthumb references, but you have no query string at the end of your image references, they just look like:

        The problem being that right after “Broken-Heart.jpg” there should be a ‘?’ to signify the beginning of the query-string list of arguments, so like this:

        (the first ‘&’ was changed to a ‘?’)

        You’ll notice the error changes to a 403-forbidden, which means there is a permission problem. Given that accessing the image directly works fine, the problem is likely that you don’t have the correct ownership set on your /cache folder for timthumb to generate the thumbnails into. You will want to make sure that owner of the /cache directory is the same process that runs your web server (OR if you have a FPM setup, the process that runs your PHP processes), that way it can run the timthumb script and write out the cached files.

        • Arpita February 16, 2012 at 5:45 pm #

          Hi Riyad,

          Thanks for your reply. It was security issue on my sever, but now it is hosted on different server and it works fine. so nothing to worry about.

          I really appreciate you help.


  3. Fernanda Thiesen July 3, 2010 at 7:20 pm #

    thanks for this tip. ‘chmod 777 cache’ solved my problem.

    • Riyad Kalla July 3, 2010 at 10:26 pm #


      Excellent, glad we could help!

  4. John July 21, 2010 at 12:36 pm #

    Hey there! I just transfered my blog over from my school servers onto a paid hosting. I have access to cPanel so I am the server admin… I CHMODed cashe and timthumb.php to 777 and 755 to no avail. I do have php-gd and I am not using apache mod_security. I’d try the gooder betterest approach but I have no clue where to start with that. I have heard people say that for some timthumb only works when wordpress is in the root directory. I’m working in a blog subdomain and that is not an option. I still get a 500 error when I am trying to access the script as such : http://blog.thebestjohn.com/wp-content/themes/arras-theme/library/timthumb.php?src=http://blog.thebestjohn.com/wp-content/uploads/2010/07/Screen-shot-2010-07-01-at-6.08.29-AM.png&w=640&h=250&zc=1 any ideas?

    • Riyad Kalla July 22, 2010 at 4:19 am #

      Hey John,

      Real quick, the ‘temp’ and ‘cache’ folders under the ../arras-theme/library directory are the ones that need 777 (read write) access. timthumb.php script itself just needs read access for the web server to load and run it, it’s probably a security risk to make it read/write.

      Also, hit the timthumb script, let the 500 error occur, then view your Apache log, the error log specifically, and see what it says about the script and why it’s failing to run.

      I don’t know how cpanel represents this information to you, but it’s typically under /var/log/httpd or /var/log/apache2 depending on your distro.

      • John July 22, 2010 at 9:14 am #

        I thought of that before but for the life of me couldn’t find the log file… in cPanel they actually have a log checker so you don’t have to open any files. I finally found that option and it turns out that you do need to make timthumb 755 but you also need to make sure that the library folder, the theme folder, and the content file needs to be 755 as well. I had just 777’d the whole shebang… bad idea.

        • Riyad Kalla July 22, 2010 at 9:27 am #

          Weird, so 777’ing all that stuff actually made it break, but 755’ing it make Tim happy?

          That’s strange, but hey, at least it works now.

          Thanks for letting us know.

          • John July 22, 2010 at 2:56 pm #

            Yeah the error that kept popping up on the Apache log was that it was group writable… i assume that 757 would have worked as well. I guess I just had to use a little more perseverance to find the log file.

            • Rich October 10, 2010 at 11:09 am #

              Yup, I had the php script at 777, changed it to 755 and bingo, works now.

              Thanks people!

            • LenaLandmine February 6, 2011 at 8:55 pm #

              You’re my hero! I’ve been working on this for hours. This fixed it!

  5. Ron July 24, 2010 at 10:52 am #

    I tried ALL the above and about to throw myself from the window!! Any help is much appreciated? http://www.skiinglebanon.com (see the broken imageS)

    • Riyad Kalla July 24, 2010 at 11:01 am #


      Don’t throw yourself out the window yet. Let’s get some info from you first — are you using a control panel like cPanel to manage everything or are you savvy at the terminal and have root access to your server?

      What is the dir that timthumb.php is installed to?

      • Ron July 24, 2010 at 11:59 pm #

        Hi Riyad,

        I’m using cPanel and have set the required the php file and cache dir to 755. The file is installed in /wp-content/themes/parallelus-unite/includes/timthumb.php

        I’m using WP3 in multimode. I tried entering the image link hard-coded (real path) and /file/….. but both did not work. However, when I paste the links, the image shows:

        Any hint?
        Thanks again

        • Riyad Kalla July 25, 2010 at 6:40 am #


          Create a /temp dir right next to the /cache dir and make sure they are in the /wp-content/themes/parallelus-unite/includes directory — set them both to 777 — if you don’t have the owner of the directories set to be the same processes that runs Apache (no idea how you find that from cPanel) then that is why 755 isn’t working — because 755 grants r/w/x to the *owner* and read/execute only to group and other.

          More clear-ly-er: Unless you have the owner of the /temp and /cache subdir correctly matching the account that Apache runs under, you are STILL not letting it write to those directories with 755 which would explain the issue.

          As mentioned in the post, the preferred method would be to make the owner of the dirs the same as the process owner of Apache and then 755 will work fine, but 777 will work just the same and as far as a security risk, I don’t think it’s big enough to even matter.

          At this point let’s just get it working then you can play with the perms all you want.

  6. Tom July 26, 2010 at 7:55 am #

    Hi everyone – I have had timthumb working for a few months. It just quit on me over the weekend. When you go to http://www.oralanswers.com, the image is supposed to load in the blue box on the left next to the article. It’s not loading.

    Tim thumb seems to be running. I changed the permissions and everything, but it just says “no image specified.”

    Does anyone have any suggestions? Thanks!

    • Riyad Kalla July 26, 2010 at 8:03 am #

      Tom, images seem to be working now. Did you figure out what was causing the problem?

      • Tom July 26, 2010 at 9:19 am #

        Thanks for replying, Riyad.

        I went into my backup from last week and re-uploaded all of the script/cache/images files from then so it would have to re-create everything… That’s all I’ve done since I posted here, so something must’ve happened.

        Either way, I’m glad it’s working. Thanks for being available to help!

        • Riyad Kalla July 26, 2010 at 9:30 am #

          Weird. Well I’m glad it’s working. If it barfs again come back and see us.

  7. Riyad Kalla July 26, 2010 at 8:04 am #

    @Ron – Nice job finding the fix! Out of curiosity did you try and download the latest release of TimThumb and see if that change is already in there? It seems TimThumb is used on *a lot* of WordPress sites, I can’t imagine an omission like that was missed… maybe you had an old copy of it? The timestamp and version of the one you have should be in the top of the timthumb.php file.

    I believe 1.14 is the latest.

  8. Ron July 26, 2010 at 8:10 am #

    @Riyad I got it through the wp theme but it doesn’t tell which version. Nobody mentions on the Internet that a new version handle WPmu or WP3 multisite. Anyway, being new to php and WP, it’s good to learn, always!

    • Riyad Kalla July 26, 2010 at 8:13 am #

      Ron that’s certainly true and you have a solid working fix there which is never a bad thing 😉

      Thanks for sharing it for anyone else that is running into the same problem.

  9. raaja July 28, 2010 at 3:06 pm #

    im having prob with same issue… once i upgrade the wp manually… the timthumb not working… :(


    check the images.. looks empty…

  10. Toba July 29, 2010 at 9:57 pm #

    Hey. I have read your posts and they have been great but they haven’t helped me yet. I am using cpanel and I have timthumb running but it does not display any image (http://shopwades.com/wp-content/themes/viroshop/timthumb.php?src=http://shopwades.com/wp-content/uploads/2010/07/twitter-female_1.png&h=108&w=108&zc=1). I actually have this same installation on a Windows server offline and it works. I have created a temp folder (which didn’t exist originally) in the viroshop folder and I have given the cache and temp folders 777 access but nothing yet (except errors like Warning: finfo_open() [function.finfo-open]: Failed to load magic database at ‘/usr/share/misc/magic’. in /home/shopwade/public_html/wp-content/themes/viroshop/timthumb.php on line 373).

    What am I doing wrong? Pls help.

    • Toba July 29, 2010 at 10:03 pm #

      Just found a solution for my problem. I got new timthumb.php codes from http://timthumb.googlecode.com/svn/trunk/timthumb.php and it works!! I am so glad cos I have been troubleshooting this for way too long. Thanks

      • Riyad Kalla August 2, 2010 at 12:19 pm #

        Toba, glad to hear it was such a relatively simple fix man.

      • Miru February 14, 2012 at 12:01 am #

        I did the same thing and it fixed the broken image/display problem i had after installing a new theme. So for all of you having problems, you can try downloading the latest timthumb.php and replace your older one. Worked for me :) Thanks for this post on Mr. Riyad’s site.

  11. Shelyn August 2, 2010 at 7:35 am #

    Hi Riyad,

    If all my images are extracted from photobucket, can thumb.php load the image from photobucket? It shows error 403, ‘Access to this resource on the server is denied!’.

    It only works when I point it to the image located within the same hosting server.

    Hope you can assist,


  12. Shelyn August 2, 2010 at 7:35 am #

    Hi Riyad,

    If all my images are extracted from photobucket, can thumb.php load the image from photobucket? It shows error 403, ‘Access to this resource on the server is denied!’.

    It only works when I point it to the image located within the same hosting server.


    Hope you can assist,


    • Riyad Kalla August 2, 2010 at 12:25 pm #


      It seems timthumb is only intended to scale local images and not remote ones unfortunately. It’s probably possible to modify TimThumb to accept remote resources (he may have this intentionally disabled to avoid using the script as an image scraper or something).

      I just tried with a few random images online using your timthumb link, and each time the timthumb host (your server) throws the 403 — not any of the image hosts themselves, so it seems to be a limitation of the script itself.

      • Shelyn August 4, 2010 at 8:13 am #

        Hi Riyad,

        Thanks! Hmm… look like I gonna add in thumbnails manually for more than 100 posts if I gonna use the script. *sigh*

        • Tom | Oral Answers August 4, 2010 at 10:24 am #


          If you have the space, I would definitely recommend downloading the images and putting them on your own server. That will speed up load time and allow you to automatically generate the thumbnails.

          I think in the long run, it will save you time.

  13. Josh August 5, 2010 at 2:29 pm #

    Is PHP5 required for timthumb to function?

    I am stuck as well … seems like I keep trying everything but can’t get any images to show on my site http://www.bankofthesierramedia.com/starsummit

    I’m hosting with Dotster … I wonder if that’s the issue

    • Josh August 5, 2010 at 3:39 pm #

      seems like I might have figured it out. Also, I had my host upgrade my account to PHP5

      • Riyad Kalla August 6, 2010 at 9:31 am #

        Josh sorry for the delay in responding — I think PHP5 is required.

        What ended up being your issue? It might help another person finding this post.

      • twisstedswisster January 30, 2011 at 5:50 am #

        Was having a similar issue with Dotster and found a solution

        First I changed persimssion using doter’s cPanel on the scripts folder, the timthumb.php file and the cache folder within the scripts folder. I followed directions from the following url. http://omynoggin.com/2010/06/11/timthumb-php-and-wordpress/

        Secondly, I noticed that when I migrated my database, the custom fields containing the image url had incorrect url’s from my test server and needed to be updated.

  14. Gabe Arnold August 16, 2010 at 9:49 am #

    Thank you so much for this post. I too have forgotten and remembered this before, but this was very informative and I finally bookmarked it.

    • Riyad Kalla August 17, 2010 at 10:45 am #

      Gabe, you are most welcome. I’m just hoping the next time this happens, I don’t forget I actually wrote this :)

  15. www.pagewithgames.com August 19, 2010 at 3:09 am #

    thank you all !!!!!!!!! it just solve my thums problem!have a nice day

  16. Mike August 20, 2010 at 1:53 pm #

    Hi, I must be overlooking something. Here is the path to timthumb http://onlinesupershops.com/wp-content/themes/blue_moon/timthumb.php – it returns a 404 error. I had to create a temp folder. Is it supposed to be inside the cache folder or on the same level? I’ve set permissions on both folders and can see the file via ftp program but it returns a 404. Any suggestions or help please. Thank you.

    • Riyad Kalla August 21, 2010 at 5:54 pm #


      The directory configuration you want is:
      ../blue_moon/cache <– chmod 777 ../blue_moon/temp <– chmod 777 That being said though, if timthumb.php was running correctly, you would be getting back the version reply and not a 404 — so even fi you configure those dirs correctly the issue will lie elsewhere. What are the permissions and ownership of timthumb? do you know the user that your web server runs under? for example the “apache” or “www-data” user and group?

  17. Jay August 30, 2010 at 8:50 am #

    Hi all,

    Been reading and following this searching for these dam timthumb errors. A site I built for some reason decided to just stop working. All has been fine before this and have no idea. When ever we try to use timthumb it just says ”file not found /wp-content/uploads/2010/08/alice olivia1.gif” for example. I have tried everything but no joy. Any help is much appreciated.


    • Riyad Kalla August 30, 2010 at 5:46 pm #


      TimThumb won’t resize BMP or GIF images from what I remember… so make sure it is failing on a JPG, then try the follow things real quick:

      1. Update your copy of TimThumb with the latest one from here:

      2. From the error message, copy the full path to the image it says it cannot find, and put it into your browser and make sure you can access it directly. If *that* doesn’t work, then TimThumb might be fine and your image paths are the ones that are screwy.

      3. Try and access TimThumb.php directly, make sure you get the version printout and not some 404 or script error. If you do, then your problem is elsewhere.

  18. Lucy September 9, 2010 at 9:45 am #


    I am having the same problem as lots of people here, and have tried all the recommended solutions, but nothing seems to work! Images are not displaying on homepage (www.vontour.net), but appear fine on the post itself. There’s no error message, just no image!

    I have changed my permissions to 755, as directed by hoster, xilo, and have tried updating the script with the latest one, but all to no avail. The theme was created by siiimple, and I just uploaded the theme with the timthumb inlcuded. I am total novice so am probably doing something wrong that’s very simple – I just don’t know what it is…..

    any help/ advice gratefully received.


    • Riyad Kalla September 9, 2010 at 9:49 am #


      I just checked your site, and your theme doesn’t look like it has sports *for* thumbnails to display.

      When the TimThumb script is used, you will see IMG entries in your html like:
      <img src=”…/timthumb.php?…/myimage.png”>

      or something like that — essentially a reference to the timthumb script with the full URL to the display image as the only argument.

      When I view-source on your home page, I only found placeholder HTML comments, like:
      <!– Start Tim Thumb –>
      <!– End Tim Thumb –>

      in the code, but absolutely no reference to timthumb or any other PHP script for that matter in the page itself.

      You will need to contact the author of the theme and ask about thumbnail support – it is possible (if he claims thumbnail support) that he is using a different method or expects the timthumb script somewhere else in your installation, I’m not sure.

      Either way you will need to ask him.

  19. Tom September 14, 2010 at 4:41 am #

    Hi everyone, does anyone have an idea as to why timthumb would selectively generate images but not others?

    For example, if I go to this tag page: http://www.oralanswers.com/tag/gingivitis/

    There should be four thumbnail images generated, but they don’t all show up… I know timthumb is working since most of the thumbnail images show up on my blog. Thanks!

    • Riyad Kalla September 14, 2010 at 7:42 am #


      I just checked and all 4 thumbnails are showing up just fine — try hitting SHIFT+Refresh in your browser and see if that helps.

      ALSO, this will happen in the future so I’ll answer the question anyway :)

      TimThumb supports scaling JPG/PNG and GIF images, occasionally you might try and upload a BMP or TIF image and they won’t scale at all and the thumbnail will show the broken-image icon in your browser, that is because TimThumb cannot process those file types.

      So just make sure everything is JPG and PNG and you should be all set.

  20. Harris September 24, 2010 at 9:07 pm #

    Hi Riyad,

    Same problem here as I have uploaded the new version of thumb.php and accessed the page it shows 404 error but in previous version of thumb.php showed “No image specified” so again I uploded the older version but shows the 404 as in the newer version. Played with permissions but Still I have no clue where it stucks, http://www.weddingplanneretips.com/ this is hosted in VPS server.

    Looking for a solution.



    • Riyad Kalla September 27, 2010 at 6:32 pm #


      Are you still having the problem? I just saw your reply, sorry for the delay.

  21. Jim September 28, 2010 at 4:49 am #

    hello… i am having the issue also. I have changed the cache folder permissions to 777 and it still does not work. I am using the wootheme busybee on the site… http://www.exoticsandluxury.com

    Any ideas on what to try next? The script file is called thumb.php in the busybee theme folder.

  22. Jim September 28, 2010 at 5:00 am #

    nevermind.. i upgraded to the latest thumb.php at http://code.google.com/p/timthumb/source/browse/trunk/timthumb.php and it worked!!

    • Riyad Kalla September 28, 2010 at 9:03 am #

      Jim, glad it’s working now! Also, that’s a really nice looking site you have there.

      • Eka Putra September 29, 2010 at 8:17 am #

        Hi, few minutes ago I also have the same problem to work with timthumb, I working on LAMPP in Ubuntu. I have tried with the old version of timthumb, and I didn’t work. It is quite frustrating.

        Finally I got it working, and here what I am doing:

        1. get the latest timthumb.php here http://timthumb.googlecode.com/svn/trunk/timthumb.php, I put it in my theme directory(../wp-content/themes/mytheme/timthumb.php).

        2. Create a temp and cache folder in the same directory, and set the permission to 777.

        3. I just use default WordPress url/path to timthumb.php and the image. No need to create specific function to handle the path, because timthumb already handle it.

        and my final code just similar to this :

        and it works!..

        By the way it work in my localhost, next time if I use this theme in my live hosting server and if it didn’t work, I think I just need to play with the file permission.


  23. Eka Putra September 29, 2010 at 8:29 am #

    Upss.. I think my code was eaten by WordPress.
    here is my final code :

  24. Daniel October 7, 2010 at 11:51 am #

    Alrighty, I’ve tried applying fixes that worked for others but I think they all haven’t worked for me.

    My problem I think is that my wordpress files are using a different URL than the site URL.


    This doesn’t work


    But this does?!


    The only difference is the second /ecc/, how can I get timthumb to remove this?

    • Riyad Kalla October 8, 2010 at 1:39 pm #


      I looked over this and I have absolutely no idea why TimThumb is getting tripped up on the valid links… infact the link that does work is totally invalid as you pointed out:

      it doesn’t even point at an image.

      I’m looking through the TimThumb code for something obvious, but from what I can see, it doesn’t do any manipulation to the base URL for the image, which makes even less sense why that works with the invalid URL.

      The only thing I can think of is making sure you replaced your copy of timthumb with the latest official release incase there were some odd customizations to the one you are using now (e.g. from a theme author or something like that):

      if you already tried this, then I’ll just keep digging and post anything interesting I find.

      • Daniel October 8, 2010 at 3:18 pm #

        I did already apply the newest version of timthumb!

    • Riyad Kalla October 8, 2010 at 1:41 pm #


      I just had another idea, TimThumb is pretty good about rendering errors when something goes wrong, can you check your PHP log for any errors from it that might indicate which portion of the code is execution and what issue is occurring?

    • Riyad Kalla October 8, 2010 at 1:44 pm #

      Hmmm… reading through the code, there is a “clean_source” function that tries to translate the URL to a local file reference on your server where it can grab the file from to resize it… is there something odd about the /ecc/ecc URL not mapping to a literal directory on your server?

      Are you using alias on your server such that it isn’t an actual directory on your machine?

      TimThumb might be matching the two domain references (the source of the script and the file) and seeing that they come from the same machine and then attempting a local file operation and that breaking if /ecc/ecc is some alias you have setup in Apache and not a real dir on the filesystem of the server.

  25. Daniel October 8, 2010 at 3:16 pm #

    There is nothing odd about my wordpress install other than I have the siteurl set to depts.washington.edu/ecc and the wordpress url at depts.washington.edu/ecc/ecc/

    Actually that first link will work but you have to add the /ecc/ and make it depts.washington.edu/ecc/ecc/…..etc which is the absolute address of the image.

    I feel like there has to be something in my .htaccess or timthumb that is trying to clean the URL or isn’t taking into account that my wordpress files are stored just one directory away more than normal

  26. Benjamin November 3, 2010 at 2:28 pm #

    This may seem like a stupid question but here is my situation:

    I am running a customized version of the Freshlife theme from Theme Junkie…. its use Timthumb for thumbnails…… I recently setup a CDN using W3 Total Cache (plugin) anyways so I am wondering how I would configure Timthumb or maybe my theme to start using the cdn for serving thumbnails instead of serving thumbnails from my local server?

    • Riyad Kalla November 3, 2010 at 7:02 pm #


      Not sure on that one. I’ve not been successful with TimThumb scaling pictures from a different domain and storing them locally well although I think it is suppose to work.

      TimThumb would need to be modified to work with some temp space reading/writing on your CDN somewhere and that isn’t anything it supports out of the box.

  27. Dan Davidson November 3, 2010 at 6:11 pm #

    I was having major issues with timthumb and had tried almost everything to get it working. The issue was very odd; timthumb was successfully creating thumbnails (I could see them in the cache folder) but they would not be displayed on the page. I was using the latest version and had made sure that the permissions were set correctly etc.

    I finally got it working by using an older version of the script (the one which comes with the Smashing Magazine ‘Magazeen’ theme). This seems completely counter-intuitive, although the server I am working with is a POS [under]powered by Plesk (I despise Plesk).

    Anyway, just thought if none of the above worked for anyone, maybe try using an older version as a total last resort.

    • Riyad Kalla November 3, 2010 at 7:03 pm #

      Dan, every bit of data helps, thanks for sharing! I wonder if Magazeen made some modifications to TimThumb or possibly relied on some older default behavior that changed in the new release… either way I’m glad it is working now!

  28. Jeff November 8, 2010 at 6:54 am #

    Hi There,

    First off thanks for any help that can be provided:). I have done all the correct permissions and downloaded the latest version. Yet I still get the error below when I try direct. It just says File not found like the example below:

    file not found ~pro/wp-content/uploads/2010/11/pro_white-150x150.jpgQuery String : src=http://www.site.com/~pro/wp-content/uploads/2010/11/pro_white-150x150.jpg&w=130&zc=1TimThumb version : 1.16

    Any ideas why this might be?

    Could it be because it being referenced via the directory (~)??

    • Riyad Kalla November 9, 2010 at 7:18 pm #

      Jeff, could be. Normally the reference URL should be absolute (http://something.com/pic.png) did you modify the script at all or is your theme using the relative server path like that?

  29. Tanner Smith November 16, 2010 at 1:04 pm #


    It would appear I am not even making it into the timthumb.php file. Currently you go to my site and nothing happens in the header where the images should be (they are part of a slider), I just get bad links none of the error messages are showing or anything. This was all working, but we had some server switch and everything stopped working, so I went and updated the script to the latest version and tried the following.

    file is at:

    I have tried setting the following to 777 and 755

    Neither of which worked….

    My images that i am referencing for timthumb are in

    I am using the host manager through the web browser and filezilla to edit my permissions and such. Not sure if that is CPanel

    • Riyad Kalla December 1, 2010 at 9:21 pm #

      Tanner, I finally got around to looking at this and I see TimThumb responding to the hit, so are things working now?

  30. Jeff November 16, 2010 at 8:53 pm #

    Hi Riyad..

    I was able to get mine working… it turned out to be that I needed to have the wp-content (wordpress) folder 755 not 777. This is due to the different secuirty setup of the server I am on. If any of you others are not getting images intot the cache you might want to look at this as a solution.

    Hope this helps somebody else.


    • Riyad Kalla December 1, 2010 at 9:22 pm #

      Jeff, great find, I didn’t know that 777 would cause issues, that would be a frustrating thing to troubleshoot without a tip.

  31. ridhoyp November 17, 2010 at 4:07 am #

    Helo, i am new in timthumb, i want to change my directory image to my subdomain static.riskianawulan.net , and here my domain http://ridhoyp.net/ , before i change the directory it looks good.. can you help me please.. the timthumbs wont display again :(

    here is the error result once i try to view the image :

    remote host “static.riskianawulan.net” not allowed
    Query String : src=http://static.riskianawulan.net//2010/11/lockf2.png&h=180&w=250&zc=1
    TimThumb version : 1.16


    • Umesh Gaire September 21, 2013 at 10:42 pm #

      I have same issue too. have you fixed it ? please suggest me too.

  32. ridhoyp November 17, 2010 at 3:47 pm #

    hello i found the fix for my problem, in this website : http://jeremy.infinicastonline.com/2010/01/cross-domain-timthumb-php

    ^ ^, thankyou

    • Riyad Kalla December 1, 2010 at 9:26 pm #

      ridhoyp, great find! thanks for posting back here for anyone else running into the same issue. I’ll update the post with a link over to that solution as well.

  33. Jensen November 18, 2010 at 12:11 am #

    Sort of off topic, but its the reason I am looking into timthumb thumbnail generation.

    I wanted to know which plugin / script you used to generate your “related stories.”


  34. aaron November 22, 2010 at 2:40 am #

    Hi Riyad, I’ve been over and over and over this post and the comments I just can’t get my head around it…

    timthumb creates the thumbnails and puts them in the same folder as the original image /content/uploads….. but never loads them on the page. When I have a look with firebug at the the blank spot where the image should be i see

    I’ve set permissions to 777 and followed your advice but by this point I’m completely lost


    • Riyad Kalla December 1, 2010 at 9:50 pm #

      Aaron, I didn’t see the example URL of where the images end up, can you post that for me? The URL that one of the white boxes show. Also another user said he had to use 755 perms to get things working due to security settings in his app server, I wonder if that might help?

  35. Mutahhar Mustafa November 23, 2010 at 11:38 am #

    Hi, i am using TimThumb here, and can’t seem to find out what is missing this is the code :

    			The Creative Shock
    			The Creative Shock
    • Mutahhar Mustafa November 23, 2010 at 11:41 am #

      img src=”http://www.designscoded.com/cleanfolio/wp-content/themes/cf/includes/timthumb/timthumb.php?src=http://creattica.com/uploaded-images/0008/2243/dance_creattica.jpg&h=550&w=75&zc=1″

      • Riyad Kalla December 1, 2010 at 9:59 pm #

        Mutahhar, it is the cross-domain reference. I just updated the original post thanks to one of the readers providing a tip on how to get that working (new Tip #5), go ahead and take a look.

  36. Ganesh December 6, 2010 at 10:17 am #

    Hi Riyad,
    Thanks for taking the time to reply to every person’s TimThumb problems. I’d like to add one more to that list. After having read all the comments here, here’s the things I’ve tried so far..

    1. CHMODing cache and temp folders to both 755 and even 777.
    2. Checked if the thumb.php file is directly accessible. Yes, it is. It’s the latest version.
    3. CHMODed the original uploaded image to 755.

    All these, and the thumbnailer still won’t work. Do check out my homepage http://inversekarma.in for a look at the missing thumbnail and the ugly looking placeholder.

    The URL at question here –


    • Riyad Kalla December 7, 2010 at 7:16 am #

      Ganesh, I loaded up the image reference and that worked, then I loaded up the thumb.php reference and that worked as well. That’s good, it likely just means some permission issues.

      Go into the wp-content/theme directory, and do a “ls -lFa” to see all the contents and the permissions. See who owns the thumb.php file and “cache” folder — does the owner of the cache folder match the process that runs your web server? To find out who runs your web server, do a “top” and look at the “User” col to see who is running your app server (apache, nginx, lighttpd, etc.)

      • Ganesh December 7, 2010 at 10:58 am #

        The don’t match!! My server is Apache, and when I do a top, all httpd processes are run by the user ‘nobody’! So what next?

        • Riyad Kalla December 13, 2010 at 5:06 pm #

          Ahh there is your problem. You need to use “chown -R nobody cache/” to make the user “nobody” own the cache folder so it can properly generate and use the thumbnails.

          • Ganesh December 13, 2010 at 11:29 pm #

            Thanks for the tip Riyad. I will get home (SSH blocked at work) and try this out and let you know. But are there any security implications in setting “nobody” as the folder owner?

  37. Bre December 18, 2010 at 8:47 pm #

    Can you help with this? It doesn’t seem to be working here either.


    • Riyad Kalla December 21, 2010 at 10:24 am #

      Bre, it looks like you got everything working. Is there still an issue you need help with?

  38. yan December 28, 2010 at 12:23 am #

    Hi Everybody,

    Thank for all this great post, it is very helpful for me.

    Unfortunately, I cannot handle to find the solution on my problem.

    Timthumb is working fine :
    no image specified
    Query String :
    TimThumb version : 1.19

    But is not handling correctly the path wordpress submit to him :

    return :
    file not found wordpress/wp-content/uploads/2010/12/bg.jpg
    Query String : src=
    TimThumb version : 1.19

    Have you any suggestion ? I can make it work if i correct the path like this :

    Any suggestion would be nice,
    Thank you all and best wishes for the comming new year !

    • Riyad Kalla December 28, 2010 at 6:10 am #

      Hey yan, Happy New Year!

      If you just try and reference the image directly, in the case of the URL you gave:

      does that work? If that doesn’t work, then the image-paths that are being generated for TimThumb to use are incorrect. If that DID work, then I’m confused.

      Are your permissions on the “cache” subdirectory under the same dir that the timthumb script lives in properly set to be owned by your web server process? For example, if your web server runs under the process user ID of “apache” or “www-data” does that owner, own the “cache” directory?

      • yan December 28, 2010 at 12:15 pm #

        Hi Riyad,

        Happy New Year too you too ! Yes, this is working if i’m calling directly the image. I just tested something interesting, if I use the name of my computer and not the ip, it’s working (like localhost).

        So, i think it’s something about a host issue … but not really sure about it.

        Thank Riyad for your kind answer,

  39. Roj December 29, 2010 at 4:16 am #

    Hi Riyad!

    First of all Happy new year to you.

    I am working on one of my wordpress site using Gazette theme from Woothemes.
    My only problem is frequently some images are not loaded randomly. I mean when clicking on the different categories some images are not shown frequently but when I refresh the page using ctrl+f5 it loads. Well having this problem and not being able to figure out what is the issue with it. Is it with the permissions or something like that as I don’t think so and I have set all the permissions as mentioned above.


    • Riyad Kalla December 29, 2010 at 10:26 pm #

      Roj, do you have a link to your site and specifically which images aren’t popping up? This might be a theme/script issue and not necessarily a TimThumb one… I’m not sure yet, but I’ll take a look and see if I can help.

  40. Roj December 30, 2010 at 9:50 pm #

    Thanks for the reply Riyad.

    Well have been facing this issue previously but I think its working fine for now.

    Will get back to you again if I get an issue with this.

    Thanks Once Again and Happy New Year 2011!!1 :)

  41. waqar January 10, 2011 at 1:59 pm #

    I am using woothemes (Original premium news theme), I have solved this thumbnail issue in my local server but when i upload to live system then it does not show thumbnail images.

    Please look at my site on featured posts: http://www.waqarhussain.net/blog/

    • Riyad Kalla January 11, 2011 at 9:11 am #

      Waqar, it seems to work fine. Are you just link-building with this post?

      • waqar January 11, 2011 at 11:09 am #

        Riyad, No I was in real trouble since 4 days and tried all suggestion to fix that issue. But only comment of Jeff published on November 8, 2010 at 6:54 am helped me. Sorry I was unable to reply you back when I fixed that issue.

        Thanks for this post! and yes I am so bad in building links, so do not worry :)

        • Riyad Kalla January 11, 2011 at 3:45 pm #

          waqar, ah no worries just wanted to know if help was still needed. Glad it’s working now!

  42. suman January 13, 2011 at 3:00 am #

    Timthumb script is giving me a lot of problems with wordpress 3.0.4

    I think its not functioning properly on 2 of my sites.


    I am getting few or no thumbnails on my index page and its making my site look ugly. Please take a look and suggest me what should be done. I have tried so many things and yet I am stuck with no thumbnails on my sites.


    • suman January 13, 2011 at 3:03 am #

      Forgot to add one thing, timthumb was working properly earlier but this problem emerged about 1 week ago.

      • suman January 13, 2011 at 3:46 am #

        After going through all the comments I have finally found the solution. Somehow my “wp content” folder was 777 ed and this was causing the thumbnail problem. I changed that to 755 and its working once again. Also don’t 777 your timthumb.php file because this was also creating the problem. Just give it 755 permission.

        Thank you all for your input.

        • Riyad Kalla January 15, 2011 at 10:54 am #

          suman — appreciate the followup. I’m going to amend the original post with that correction so others don’t trip up on it.

        • Apple January 17, 2011 at 10:33 am #

          Thank you so much!! I’ve been depressed for over a week after I have upgraded my WordPress to 3.0.4 and having timthumb problem like yours. Now it’s solved. Thanks a bunch :)

  43. sammymaudlin January 22, 2011 at 3:22 pm #

    I’m highly customizing a theme (which is probably the isuue!) here http://villagegreenstuidos.com/view14 . I’m using the Nova theme (http://www.elegantthemes.com/preview/Nova/) and trying to get the the “Featured Slider” to move thru 5 posts (or pages) that are just png images of the jumping guy to give it an animated effect (http://villagegreenstudios.com/view14/?page_id=781 to http://villagegreenstudios.com/view14/?page_id=778…) For an unknown-to-me reason it isn’t working. If you click the broken image you get a TimThumb error: no image specified
    Query String : src=&h=775&w=775&zc=1&q=90
    TimThumb version : 1.15

    Have both cache and temp set to 777.

    If you could help at all with this it would be wonderful. Thanks.

    • sammymaudlin January 22, 2011 at 5:49 pm #

      Nevermind Riyad. I figured it out. had some settings issues with the plugin I was using. Please disregard. Thanks.

    • Riyad Kalla January 24, 2011 at 12:21 am #

      Sammy, do you have an example of a broken image link? Scrolling through the home page it looks like all the images are displaying.

  44. Natalie January 24, 2011 at 10:23 pm #

    Thank you to everyone who posted! Helped me troubleshoot a lot!

  45. John February 3, 2011 at 11:44 am #

    I’m not seeing any of my thumbnail images. I have the latest version of timthumb.php and it’s up and running.

    When I view source, I get this URL http://www.naturalcureforanxiety.com/wp-content/themes/mimbo/scripts/timthumb.php?zc=1&w=260&h=230&src=/wp-content/uploads/2010/04/river_32808-300×225.jpg which gives me a 404 – Not Found. However, when I type in the physical address http://www.naturalcureforanxiety.com/wp-content/uploads/2010/04/river_32808-300×225.jpg the image is there and works just fine. I’ve tried several different permissions 777 and 755 with no luck.

    I’m not sure what’s going on or how to fix it at this point. I’ve tried everything! Please help!

  46. Arpit Goel February 9, 2011 at 10:25 am #

    Still no luck for me after trying :-)

    I am using Freshlife theme from themes-junkee on wordpress 3.0.4 and have tried below solutions.

    1. permission change in cache, temp folder to 777.
    2. replaced timthumb.php with latest from google.
    3. using jpg images only.
    4. Confirmed with hosting provider to whitelist mod security rules but no go :-(.

    URL http://tips-n-funda.com/


    pls advise.

    thx, Arpit

    • Riyad Kalla February 14, 2011 at 8:30 pm #

      Arpit, it looks like you got things working right?

  47. Ethelbert February 13, 2011 at 5:08 am #

    my site http://www.laagcebu.com server was updated to suPHP and now my thumb.php is not working. What could be the problem? I have the latest thumb.php but problem persist. hope you can help me. thanks.

  48. Darren February 17, 2011 at 9:09 pm #

    I moved a wordpress site (http://rmdrc.dtginc.net/?cat=129) beween servers and now some of the thumbnails are not displaying. The site is using Mimbo Pro 2.3.1 and timthumb.php version 1.14.

    I have tried all variations of chomd to no effect.

    On a whim I even deleted every file in th cache. Once again nothing changed. Even after browsing the site for a while the cache is still empty.

    Any suggestions would be greatly appreciated.

    • Darren February 17, 2011 at 9:13 pm #

      I should have mentioned that I have checked that all the images exist and display when I reference them directly.

      When I right click on a missing thumbnail in firefox and select view image I get a page saying “Bad Request.”

    • Darren February 19, 2011 at 9:06 am #

      After a little trouble shooting I discovered that jpg’s ssem to be the problem. Thumbnails are displaying fro gif images but not for jpg’s I converted one of the jpg images to a gif and up popped the thumbnail?!?!?

      Has anyone else come across this? Would upgrading to timthumb 1.25 fix the problem?


      • Riyad Kalla February 19, 2011 at 10:16 am #


        Sounds like the underlying image-processing lib is incomplete or busted. I believe timthumb uses PHP GD, you might want to check that it is installed with all dependencies (if it has any?).

        • Darren February 28, 2011 at 10:34 pm #

          I passed the info on but still waiting for some feedback. Shall post as soon as I find out if this was the problem.

  49. Asmaa February 19, 2011 at 6:55 am #

    hey there just wanted to add in how it helped me
    in the themes folder down to chache all are set to 755
    only the timbthumb.php set to 644
    and it worked!

    • Riyad Kalla February 19, 2011 at 10:15 am #

      Asmaa, thank you for adding what worked for you. Every bit helps!

  50. open_image February 24, 2011 at 3:23 am #

    Hi Riyad,

    Wow, this timthumb thing has keeping you busy for a long time.
    I too am having problems with the thumbs not shoing anywhere on my site.

    This is the error I get:

    Fatal error: Call to undefined function open_image() in D:\www\kittyarends.nl\www\wp-content\themes\mimbo\scripts\timthumb.php on line 61

    when I load this url:

    I have talked to my host and even they are flabbergasted and still working on the problem.

    Do you have any idea what my problem could be?
    (cmod is okay, GD is installed)

    Thank you so much for your help,
    Greetings frfom Amsterdam

    • Riyad Kalla February 25, 2011 at 10:57 pm #

      GD is the library that provides open_image(), so if you are getting a undefined error on that, then GD isn’t installed correctly.

  51. Meshach February 27, 2011 at 5:17 pm #

    This is a great thread, and I’m sure the issue I’m facing is probably a very easy fix, but I’m at a loss.

    This is a real image:

    This is the thumb.php path:

    … and it’s CHMOD 755

    And this shows nothing.

    The cache file is at:

    … and it’s CHMOD 777 (I’ve tried 755, 775, and 777)

    Any ideas?

    • Riyad Kalla February 27, 2011 at 8:45 pm #


      That is a head scratcher… every *piece* of the puzzle works, all on the same domain and I just checked the paths for thumbs on this site (to double check) and it uses the same path format you are using which should work… args all look good.

      I would check your web server log when you try and hit on the thumbnails and see what error is getting written; I know the script says “file not found” but that could be a permission issue.

      Q: Who is the owner on the thumb.php file AND the owner of the JPG file you are trying to load AND the owner of the /cache dir? That could be the problem right there if the ownership is wrong.

      • Bert May 8, 2011 at 2:16 pm #

        I’ve got the exact same problem. Did you manage to fix it?

        Thanks, bert

        • Riyad Kalla May 9, 2011 at 7:00 pm #

          Bert, I would extend the same questions to you I suppose if you have the same situation.

  52. Kitty February 28, 2011 at 1:39 am #

    Thank you Riyad, for your suggestion.
    However, I managed to solve my problem by replacing the timthumb.php file in my theme (Mimbo 3.0) by a timthumb.php from another WP-theme called Arthemia.
    Maybe this could be a solution for other people as well. Apparently something was wrong in the timthumb script.

    A remaining issue is that the thumbs are not showing before reloading the page.
    Do you happen to know what that could be about? Maybe a missing piece of script..?

    Thanks! Kitty

    • Riyad Kalla February 28, 2011 at 7:52 am #


      Ahh ok, you might even try the most recent stable release of timthumb from the official repository linked in the original post, but if you have a working one that is good enough.

      As for the second question, I am not sure I understand… if the script is working, you would be seeing thumbnails… but you are saying you don’t see thumbnails until you reload… so when you visit the page initially, everything is busted, then if you hit refresh it all comes in OK? And this happens EVERY time? Like if you navigate away to google.com then back again, it does it again?

      Sounds like a browser cache issue more than anything if “yes”.

  53. Kitty February 28, 2011 at 8:26 am #

    I don’t think it’s a cache problem in the browser, since it happens on every computer I have tried. Also, after refreshing my page the thumbs will stay visible, also when I leave the page to see another, and then return.

    I’ll try the most recent version of timthumb and see what happens with that….

  54. 江湖博客 March 5, 2011 at 8:56 pm #

    Hi,Any help is much appreciated?
    http://shop.5jianghu.com/birds-nest-cake/(see the broken imageS)
    when I open the links below:
    It just says File not found like the example below:
    file not found
    Query String : src=http://shop.5jianghu.com/files/2011/03/yanwowoshimeirensuluetu.jpg&w=298&h=226&zc=1
    TimThumb version : 1.25
    I’ll appreciated it if you can reply me soon.Thank you very much!(I’m sorry for trouble you. My English is not very well)

    • Riyad Kalla March 10, 2011 at 8:15 am #

      It looks like you got things working?

      • 江湖博客 March 11, 2011 at 6:53 pm #

        Yes,with the help of your post ,I have got it work!Thank you very much!!!

  55. Patrick March 13, 2011 at 1:23 pm #

    Hello Riyad, i really hope you can help me because im just lost with this.

    i tried almost everything but i cant manage to make timthump work properly.

    here is the blog: http://www.murderinc-online/wordpress

    as u can see the images get displayed in the actual posts but they dont show up on the featured post section on the front page or any other section where the thumb.php needs to do his job to make them appear there. i dont have a clue why.

    the thump.php is accessible & looks fine: http://www.murderinc-online.com/wordpress/wp-content/themes/imperial/thumb.php

    the uploaded image is also fine: http://www.murderinc-online.com/wordpress/wp-content/uploads/2011/03/00_Young_Life-this_is_the_Life_Presented_by_Ja_Rule_and_Mpire_Music-2010-Front-Djleak.jpg

    but when i follow the link of where the resized image should appear i just get this weird 403 error message saying access to this resource on the server is denied! – see for yourself:


    i have tried all possible read/write attributes on the temp and cache directories (777, 775, 755) but nothing helps.

    i should also add that the cache folder stays empty somehow / the thumps don’t get created – regardless of what attribute i used while uploading them. and also regardless of what attribute they are set to i get the same 403 error when trying to access the cache or temp folder via link?!

    I really hope you can help me with my problem since i just Don’t know what to do anymore. i have installed various wp themes using the timthumb.php on manny servers but i never ran into this kind of problem before. hope u can help me. looking forward to read from you.


    • Riyad Kalla March 14, 2011 at 10:56 am #


      If the /cache folder is staying empty, then TimThumb is unable to generate the resized versions of the large images, which usually is caused by a permission issue and less frequently caused by a configuration problem.

      I am not that familiar with lighttp (your app server )but check the error logs after you make a new post (when the thumbnail should be generated) and see if there is some error getting written to the log, maybe complaining about “GD” (in which case PHP GD isn’t installed) or complaining about permissions like “Couldn’t write to directory” in which case if you make the *owner* of the /cache directory the same as the user running lighttp, you should be good to go.

  56. Alana March 20, 2011 at 1:28 pm #

    Dear Riyad,

    I have been trying for days now to fix the timthumb problem. I have done all the chmoding and checked that the gd library is installed, but the images will not appear and the cache folder remains empty. The image url returns this:
    file not found
    Query String : src=http://www.hcs.harvard.edu/~froshims/blog/wp-content/uploads/2011/03/Services11.jpg&h=200&w=320&zc=1
    TimThumb version : 1.25

    This is the website: http://www.hcs.harvard.edu/~froshims/blog/ and i amusing the newspress theme from wpcrunch
    I would very much appreciate any help you are willing to offer.

    • Riyad Kalla March 21, 2011 at 8:34 am #


      Go into the ~froshims/blog/wp-content/themes/newspress-2.0.4/newspress/ directory and do an “ls -lFa”, look who is the owner of the /cache and /temp subdirectories… does it match the same user that is used to run your server? (Apache, nginx, lighttpd, etc.)

      I’ve just tried munging the URLs in different ways to get the thumbnail to load, but in every case it just reports “File not found”, which is misleading, because I don’t know if timthumb can’t find the *source* file or if it cannot find the *generated* thumbnail file to host up.

      • Alana March 21, 2011 at 9:00 am #

        Dear Riyad,

        After doing an ls -IFA this is the result:

        drwxr-xr-x+ 2 froshims basic 2 2011-03-17 15:23 cache/
        -rw-r–r–+ 1 froshims basic 20698 2011-03-20 14:14 timthumb.php

        “froshims basic” is listed as the group for all directories and I do not have a /temp directory.

        I believe that the “file not found” is a result of the cache not containing any files, but my understanding of this issue is very limited.

        Thank you again,


        • Alana March 23, 2011 at 8:09 pm #

          Dear Riyad,

          I think the problem is that timtumb cannot find the actual uploaded image and so is not even getting to the step to resize the image. Do you know why this could be? I had to move the site to


          and to simplify matters I am using the plugin wp-content-slider to look into the timthumb problem



          • Riyad Kalla April 12, 2011 at 5:25 am #


            In your particular setup I’m not sure why it wasn’t working, but if not being able to find the source image was the issue, timthumb should have spit back an error to you or shown it in your web server logs to help narrow down the problem.

  57. Prashant April 1, 2011 at 4:06 am #

    i am also having this kind of problem…

    but there is a variation… when i am writing an article related to google new +1 Feature… then only this is happening to me..

    otherwise my blog is working completely fine.. this is strange but a problem…
    chk out on my blog zimboora.com

  58. Aleirita April 8, 2011 at 5:46 am #

    HELP!!! i’ve been trying to fix this all night.. its 6am now =( …. finally i found this and i’ve read most of the threads and made the changes but it doesnt work…

    here is the link http://www.kathesdesigns.com/aoe4x4site/aoe-featured-in-jpfreek-magazine

    i changed the cache and temp to 777 (also tried 755) same with the thumbs.php file

    please help me!



    • Aleirita April 8, 2011 at 12:25 pm #

      after going crazy and looking all over the place.. finally found the solution.. http://ravidreams.com/2009/10/wordpress-automatic-thumbnail-issue-with-hostgator/ and yes it was a hosting problem… so here it is:

      If you are hosted with Hostgator, you may have a problem with the automatic thumbnail generation feature that many WordPress themes provide. To solve this:

      1. Login to your Hostgator control panel and contact Live Chat Support.

      2. Ask the support technician to white list your thumbnail generation file for mod_security . You will need to give your file name and path. The file name mostly will be timthumb.php . You can find this file inside the WordPress theme folder. An example file path wp-content/themes/theme_name/timthumb.php

      This is a known issue with Hostgator’s WordPress hosting and all the technicians can recognize your request. This problem will be solved by them in minutes.

      Before approaching them, make sure that all folders’ permission is set to 755 and files’ permission is set to 644. You may also be asked for the credit card / PayPal info to verify that you are the owner of the hosting account.

      They were really nice and it took less than 5 minutes to get fixed…

      so good luck and hope this helps someone else!


  59. Jazzy April 20, 2011 at 8:22 am #

    Hi guys,
    I’ve been working with wordpress e-commerce theme on virtual server (on xampp) on my computer and everything was just fine. Then I moved the page to the server and now the small images are not displayed.
    What’s interesting, the links to the images seem to be fine. When I am clicking with the right button the field where the any of the pictures should appear and chose “open graphics in the new tab” the image shows up in good size.
    It is really driving me mad. I was traying all of the tricks with changing the permissions but it did nothing.
    Check out my site: http://www.amsoil.net.pl

    • Riyad Kalla April 24, 2011 at 5:53 am #

      Jazzy, there is something weird going on… all the pictures show up fine initially, then they all clear out and show a broken link after like a second. I loaded the timthumb “src” image URL directly into my browser, it shows fine then after about 500ms it disappears and shows a broken link.

      The only thing I can think of is a proxy or something on the server (or in the way on the host machine) causing the final bits coming down for the image to be corrupted so the image gets nuked in the browser…. but even that doesn’t make much sense to me… I thought it was a rouge script at first, but I loaded the image SRC directly and it still clears, even with no script running.

      I’m not sure what is going on so all I can think is a host/server/service interfering.

  60. Ryan April 24, 2011 at 9:37 pm #

    Hello- wonderful thread. still scratching my head though.

    my file permissions are good to go.
    i have the current version of thumb.php
    gd is installed and working on my server.

    but alas, no thumbnails generating.

    of note, i am getting a 500 Internal Server Error when attempting to hit thumb.php

    check it if you have time:

    • Riyad Kalla April 26, 2011 at 4:51 pm #

      Ryan, I see thumbnails on the site, so I guess you got it working?

  61. Peter April 28, 2011 at 5:01 pm #

    Hi Riyad,

    I’ve read your post and the comments with much interest and have tried everything suggested but still don’t seem to be having much luck.

    I have checked all the permissions (all set to 755) and tried every variation. I have also checked the owner and it is the same everywhere.

    I am running PHP5, have GD installed, I am running timthumb.php version 1.26, which loads when queried:


    It is installed in my theme directory.

    I can reach all of the full-size images directly from a browser that timthumb can’t seem to find directly from a browser.

    No files are being created in the cache or temp folders.

    Any suggestions as to what to try next?

    See a post here:


    Many Thanks,


    • Peter April 28, 2011 at 6:19 pm #

      Hi Riyah,

      Just to say I decided to go with another method using wordpress’s inbuilt thumbnails rather than generating with timthumb.

      Many Thanks,


  62. Jami April 29, 2011 at 6:21 am #

    This post and comments have been a beacon of hope. I’ve come across many TimThumb problems which I’ve always been able to resolve by changing the file permissions, or, making sure the server has GD library and all other requirements to function.

    But I’ve never been in the following situation:

    The TimThumb script is loading (confirmed by going to the direct URL and viewing the script version).

    The image URL is generating (also confirmed by going to the direct image URL and the large image is displaying in the browser).

    The cache folder is NOT saving new images.

    The site is not displaying any images.

    I have tried all of the different permission configurations suggested in the comments (777 & 755).

    I have double checked that my wp-content folder has 755 permission set.

    It’s killing me! What could I be missing?


    • Riyad Kalla May 2, 2011 at 8:43 am #

      Jami, I see what you mean. I just loaded the website, and did an “Inspect Element” on the first post with the missing thumbnail.

      Linking to TimThumb works fine, BUT linking to the remainder of the image (including the w/h/z query string args) gives a 404… removing the query string args results in the image showing up. So this doesn’t work:

      but THIS does work:

      The weird part is that adding spurious query string args to a direct image reference shouldn’t change anything. Query string arguments are just a method of adding more data to a URL so the *server* can parse it and do something interesting with it.

      In the case of timthumb, the query string args (h, w and “zc”) are used to determine how to resize the picture. BUT accessing a picture directly, those arguments suddenly lose all meaning and should just be ignored, for example:

      works just fine… everything after the “?” is ignored.

      BUT, on your server, those are not ignored… they cause a 404. What that means is that on your server, there is some PHP script or something intercepting those URLs and barfing on them, so what gets sent to timthumb is a 404, not a working image to scale.

      If you are familiar with redirects on Apache or you have been messing with you, you like have a rule that is catching your image references and redirecting to a script that is causing this screwup.

      Out of the box, WordPress won’t do this to you, so it means there is something about your setup that is causing this.
      I can’t help much beyond this because it could be any number of things, but I hope that gets you pointed in the right direction.

      • Jami May 2, 2011 at 9:10 am #

        Thanks so much for your help on this! It’s very much appreciated! I’ll forward this to my server admin and see if we can hash out a solution. :)

  63. Drew May 21, 2011 at 9:27 pm #

    Hi Riyad,

    Would you consider fixing this for me for a fee? I could Paypal it to you. Thanks please advise by email!

    Best Regards,


    • Riyad Kalla May 23, 2011 at 1:26 pm #

      Drew, I appreciate the offer but that isn’t something I would want to do. If you know someone technical they can read through this post and possibly do it for you. I would take caution with who you give the root password of your server out to though.

  64. June June 4, 2011 at 5:51 pm #

    I’m new to wordpress and really the most uncomputer savvy person ever. I’ve spent days trying to figure out how to get my slider to work. I feel like this is my last big hurdle to begin putting the content into my website. I’m using the wordpress them Above the Fold and am not getting much help from the theme developers. I’ve tried several of the suggestions listed but a lot of what is being said is just above my head. I’ve tried about every combination of permissions suggested and tried changing to the suggested timthumb scripts. I’m beginning to think maybe something is being blocked but my host has told me they have made me the owner so I should have read/write access. I have access to an FTP client. I added a temp directory that was not originally there. I really don’t even want the slider to work, I’d rather just have a static image on my homepage (not sure if doing that makes it easier but that is what I’d like). For awhile I had an issue with getting images to upload in general (on posts, pages, etc) and I was able to fix that and it turned out the problem had something to do with apache and folders going into the wrong thing or something (I was able to fix it but don’t understand, so not sure if the problems are related). I’m desperate for some help but really need tips to be dumbproof. My web address is I can provide access to my FTP client if anyone is kind enough to look at it for me. Any help is much appreciated!

    • Christopher Merry June 16, 2011 at 9:31 am #

      @June The biggest problem here is that when trying to write to the file you need a domain name. is a temporary domain and the string can not parse to the images. You are most likely getting 404 errors. Timthumb can not work on temp urls, it will work on http://localhost/folder/ it will work on http://websitename.com/ it will not work under Hope that helps as it was an issue for me for three days. Typical of us developers using temp urls to develop on but with timthumb the full url needs to be in place.

  65. Jacques June 23, 2011 at 5:01 am #

    I also have a problem with images not displaying. So reading through your post I’ve done the following:

    1. Changed the cahce and timtumb.php permissions to 755
    2. Checked if my server support GD script and all ok there

    The site ( http://www.worldstays.co.za ) slide show is trying to fetch the image here


    and can not find it but if I change the URL to


    it does actually find the image.

    Can anyone assist. IT IS DRIVING ME TO SUICIDE :)

    • Riyad Kalla June 28, 2011 at 8:26 am #

      lol, Jacques sorry I missed your post earlier. It looks like you got things working though, can you followup with how incase anyone else runs into it?

    • TheD November 22, 2011 at 6:06 pm #

      Did you find a solution besides just using relative paths? I have the same exact issue. It worked fine an a MU WP install with out any problems. Tried installing it on 2 subdomains and it failed. Only thing that works is a relative path without the domain.

  66. hallakol July 1, 2011 at 6:02 pm #

    I have the free version of wpcrunchy’s Newspress where the Featured images weren’t showing up. I solved it by updating the timthumb.php version (tip nr.2 above).

    Thanks a million :)

  67. Amal July 10, 2011 at 10:06 am #

    Hi there, I was surfing the internet, to find ways to get my thumbnail in arthemia premium theme working. In the meanwhile I found your site. Basically my problem is that thumnail images are not working at present. I tried changing the permissions of the scripts folder, cache folder and timthumb.php file to 777. Yet, its not working. I’m frustrated. Hope you’d reply.

    The site is http://goo.gl/A1nIN

    • Riyad Kalla July 12, 2011 at 11:07 am #

      Amal, in the post I clarified that 755 seems to be the permissions the script wants to be. Please double-check that you’ve tried everything outlined in the post.

      • Brian September 20, 2011 at 1:05 pm #

        This saved my bacon. 755, baby!

  68. Daniel Chapman July 23, 2011 at 12:50 pm #

    Hi There!

    Don’t normally post like this but thought I would! For all those who have followed all of Riyads instructions to no avail then you need to have your hosting whitelist your mod-sec. There is a comment about three above that tell you how to do this with Hostgator and it worked for me….FINALLY. Thanks for all the help.


    • Riyad Kalla July 25, 2011 at 7:07 am #


      Thanks for adding that note for anyone else running into the same issue. All the info we can collect helps!

  69. Kpopremix July 31, 2011 at 5:24 am #

    I tried your stuff i even asked help to my host. don’t know how to fix it

  70. June August 4, 2011 at 3:51 pm #


  71. Ben August 9, 2011 at 4:36 pm #


    This is the worst configuration issue to figure out ive seen in a while. I have one tip for noobs and those who have followed the comments in this and everything seems fine yet still no luck.

    First of all try a simple example with the script file, a /cache folder and both a small .jpg file and a small png file. Put everything in the root and run the script with the appropriate parameters, using the parameter for src= as the file name of the image only, forget paths and absolute urls, this example is all in the root and designed to prove that your configuration at your web host actually will allow your thumbs script to work.

    Set your permissions as in the instructions above and try with BOTH the jpg and the png file.

    My personal result was the JPG worked fine and the png showed nothing

    If you see no errors but no image then CHECK YOUR ERROR LOG FILE.In cpanel for example i just searched log in the searchbox and there it was. lots and lots of errors about an “incompatible libpng version in application and library in /…..”

    So in my experience it was never going to work for me without my host attending to this problem. After 8 hours of messing around trying to make it work i looked at the error log and wished that it was the first thing I did!

    I recommend it as a key step in troubleshooting.

  72. Jo September 3, 2011 at 9:41 pm #

    Hi there,

    I have a website based on the Wootheme Snapshot. This one uses Timthumb to generate the thumbs of the site.

    I didn’t have any problem since 2 years but 2 days ago, it stopped working and all the thumbs are not displayed anymore.

    When I try to call this URL : http://www.yoabonsai.fr/wp-content/themes/snapshot/thumb.php, I get the following error:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /homez.194/yoabonsa/www/wp-content/themes/snapshot/thumb.php on line 134

    I modified the permissions as in the instructions above but it doesn’t change anything.

    Any idea ? Thanks a lot for your time and help.

    • Jo September 4, 2011 at 7:25 am #

      Problem solved; I had to switch to PHP5 on my host…
      Thanks anyway !

  73. Andrew Roller September 4, 2011 at 6:02 pm #

    I have a slightly different problem and it’s because i’m using post affiliate pro to replicate my wordpress blog . the default blog i’m using as a base for replication works great with timthumb but when i replicate it the thumbnails arent generated . the post affiliate pro support at quality unit just mention checking that the full path for the img url is used.

  74. brant September 28, 2011 at 5:50 am #

    The fix for me after hours and hours was that I thought all of my permissions were set to 0755, but somehow I had set my wp-content/themes folder to 0777.

    So whilst I had the temp, cache and wp-content folders set to 0755, the problem was the themes folder set to 0777. So I’m guessing that they all need to be the same.

    Hope this helps someone!

  75. Annia October 6, 2011 at 6:34 pm #

    hi!!! I read all the posts but my thimthamb is still not working :(((.. It has benn like all day trying. . If you maybe cpuld just give me a clue!! I would gladly pay to arrange this issue..:(((

  76. Paul Widdershoven October 20, 2011 at 11:45 am #

    5 days ago my thumbnails just stopped working.
    If you go to http://1ofthebestin.ca/reid-associates-specialty-advertising-saint-john-nb/

    On the bottom of the page you can see the related listings with no thumbnails.Tried changing permission based on your article with no avail.

    Any help is greatly appreciated

  77. Neil November 20, 2011 at 3:39 am #

    Yes someone else pulling his hair out.

    I recently moved servers and now images are not appearing.

    If I right click and go to image link I get error after error. I have tried most things on here to do with permissions etc however with no avail. Anything assistance would be appreciated.


    • Neil November 20, 2011 at 3:58 am #

      Ok got it working after hours 1st I uploaded new timthumb.php followed by deleting the cachelast and index.html in the cache folder and hey presto.

      Great articles helped me alot thank you.

      • Riyad Kalla November 23, 2011 at 10:10 am #

        Neil, glad you got it working. Thanks for following back up with what worked for you.

  78. Darren November 22, 2011 at 2:51 pm #

    Can anyone help me troubleshoot what I assume is a permissions problem?

    Thumb.php works perfectly when referencing a RELATIVE link from the top index:

    But it doesn’t work when referencing a HARD link from a subpage:

    • Riyad Kalla November 23, 2011 at 10:16 am #

      Darren, try and grab the latest TimThumb release file and upgrade the one you have… I *think* TimThumb used to not like remote refs like that (technically it is local, but it doesn’t know) but it seems to work now as Neil posted that is exactly what he is doing.

      • Darren November 23, 2011 at 10:26 am #

        Thanks for the quick response.

        I loaded that older version yesterday because the latest version wasn’t working at all. I tried every trick in the book and couldn’t shake the “file not found” error.

        • Riyad Kalla November 24, 2011 at 6:04 am #

          In that case, check your Apache/nginx error log and see if timthumb is writing something more meaningful to it.

  79. ernst November 24, 2011 at 2:53 am #


    I have a problem with my site http://www.babusjka.no, it runs Motionpicture theme by obox. The theme uses timthumb, and it works almost. Sometimes they all load, and other times just some, and they also load and disappear?? Any suggestions?


    • ernst November 24, 2011 at 4:00 am #

      I found out that my host dosen´t support the use of Timthumb. They run the Apache module mod_evasive that makes a restriction to how many scripts that can run while loading the page.

      • Riyad Kalla November 24, 2011 at 6:08 am #

        Ernst, thanks for the followup. I hadn’t run across that restriction before but it is handy to know about.

  80. Eric November 28, 2011 at 10:36 pm #

    I am having trouble getting my thumbnails to show up on this site

    I am assuming it is simular to a lot of these problems, but nothing seems to be fixing my problem. I have set my permissions to 755 all around. This is driving me crazy, please let me know if you can help.


  81. KC December 5, 2011 at 8:13 am #

    Had this problem and a real quick fix is appending the below lines on .htaccess file under public_html.

    SecFilterEngine Off
    SecFilterScanPost Off

  82. Silviu ERC December 20, 2011 at 2:01 pm #

    Can you help me please … I read all the posts but didn’t managed to fix it :(


    As you can see i’m using LiteSpeed Web Server.

  83. Ola December 30, 2011 at 11:33 am #

    It baffles me how many of the people here say, that downloading the latest version of timthumb script solved their problem. Intrestingly enough, it also helped me, but only after I tried everything else. So I suppose it might be a good idea, to add this solution to your list of :)

    • Riyad Kalla January 4, 2012 at 10:12 am #

      Ola, no doubt, it is #2 on the list.

  84. shery January 3, 2012 at 3:12 am #

    can u look for my problem..

    i ‘ve change to 777 and 755..but..it’s not working.

    • shery January 4, 2012 at 6:46 pm #

      yearh,,i’ve make it..download the latest timthumb.php, make sure the file name inside index.php is correct and set ‘chmod 777 scrpts’ + click recurse into subdirectories…it’s work…thank you!

  85. Mark W January 6, 2012 at 7:16 pm #

    Great posts here!

    Timthumb was playing nice and then one day i get this, and ONLY on the home.php and an archive page. The single page is fine. Index.php is not used, I guess:

    For some reason, the src URL is parsed incorrectly. Any ideas? Thanks again!

    BTW, I have the latest update to timthumb.php and permissions set as suggested previously and use WP 3.3.

    • Mark W January 6, 2012 at 7:18 pm #

      Oops, forgot URL, sorry:

      <img src=”http://www.informationremoved.com/wp-content/themes/gabfire-snapwire-628bb9f_jacked/timthumb.php?src=http%3A%2F%2Ffarm8.static.flickr.com%2F7016%2F6634753795_e4d09b2a94_m.jpg&q=90&w=650&h=366&zc=1″ class=”” alt=”Profile & image test” />

      • Riyad Kalla January 11, 2012 at 2:31 pm #

        Mark, that looks like a remote-source reference (your src is pointing at flickr) — I have not ever gotten that to work right with timthumb, only local/same-domain references.

        • Mark W January 11, 2012 at 7:31 pm #

          I gave up and just went with local references after looking over formatting.php. I am sure with some massaging it would work, but don’t think it’s worth it at this point when local reference works just fine.

          I was using another plugin called Photodropper to find appropriate images on Flickr. I think what happened was once the image cache expired and refreshed is when it tanked and then the URLs started getting scrubbed and therefore the images no longer showed up correctly.

          Thanks for the confirmation!

  86. John H January 8, 2012 at 4:33 pm #

    I made a copy of my main WordPress site as a sub-domain on the same server. I copied all of the files to the sub-domain folder and chmod’d the cache and temp folders the same as the main WordPress site. Now, none of the thumbnails appear. Works fine on the main site. Any ideas? I’m using a Plesk control panel.

    • John H January 8, 2012 at 5:04 pm #

      I also just noticed that all of the .txt files (timthumb_int_realylongfilenamehere.timthumb.txt) in the cache directory that were on the main site were not copied over to the sub-domain version of the site.

  87. Mirko January 9, 2012 at 5:37 pm #

    I’m using “imdb link transformer Plugin” to generate the information of my posts, with it also adds the image to the post.
    The problem is that it fails to recognize timthumb my image and it generates the featured images.
    Try several plugins like Auto post thumbnail , auto featured image, etc etc. but none works …
    Please Help me!

  88. News5 January 12, 2012 at 7:25 am #

    Thanks for the article.
    I am facing problems with images loading.the browser Firefox is loading site well,but other browsers(Internet Explorer) are not loading properly.Please let me know how to resolve this issue.
    Here is our site url,please check it and help me.


  89. Sander January 22, 2012 at 7:04 am #

    Thanks everyone and especially Ryad for the excellent advice. Been struggling with this on my site http://www.domaine-du-moulin.org but now working like a charm and no more 404 errors.

    Main tip was to update to latest timthumb.php version and if you are using some sort of protection plugins, make sure that the settings in the protection module are not too strict, for example allow long URLs.

    Cheers and all the best.

  90. Nick January 26, 2012 at 4:18 pm #

    Hey everyone,

    I’m having the exact same issue with my website at the moment.

    I installed the Optimize Press that uses timthumb.php.

    Tried every trick I read in this thread and in hundreds of other websites…. nothing seems to work for me.

    Here’s my blog where I’m trying to get the thumbnails to show up:

    And here’s the link to my timthumb.php:

    Nothing shows up when I try to load up the timthumb… as if something is blocking the script.

    Someone help me please…. I’m about to give up all hope!



    • Riyad Kalla February 2, 2012 at 1:40 pm #

      Nick, it looks like you got everything working.

  91. Gitush January 30, 2012 at 8:19 am #

    I really hope this forum can save me….

    I did this website for a client http://www.gigimotorslimited.com/ and the images on the front page have just refused to show! I dont know what im doing wrong. Im not sure of its a thumbnail error but im pretty sure it is. The timthumb file is here http://www.gigimotorslimited.com/wp-contentthemes/Automotiv/scripts/timthumb and when i input in the browser its giving me this error ‘The page you are trying to reach cannot be found.’ Is that normal?

    Somebody help me out. Urgent! The client is on my neck.

    • Riyad Kalla February 2, 2012 at 1:39 pm #

      Gitush, this isn’t really a TimThumb error — you just have a problem with your configuration here. First off the broken image link on the front page looks to be a missing image or an image with improper permissions.

      Your TimThumb link should not return a 404, it should return a simple status message from the TimThumb script showing the name and the version number.

      I don’t think I can really help here because there are likely a few things misconfigured and I wouldn’t know where to start.

      • Gitush February 3, 2012 at 1:08 am #

        Hey. thank you for your reply Riyad.
        The images have the correct link as far as i can tell. They are all characterised by the full link http://www.gigimotorslimited.com/wp-content/uploads/blah blah……they are stored in the uploads folder. In the individual car pages the images are showing but the main image and on the homepage they are not.
        Secondly the images all have a 755 permission in the uploads folder where they are stored, which i assume should be the case. The Scripts folder has a 777 perm, together with the Cache, Temp folders and the Timthumb.php.
        Please help me out. Any info you need ill provide.

        • Riyad Kalla February 3, 2012 at 3:29 pm #

          Gitush, I think a few people in this thread mentioned needing to set 755 on the /cache and /temp folders and that TT didn’t like the 777 perms… give that a try.

          • Gitush February 6, 2012 at 7:16 am #

            I have done all that the thread has suggested all through. I had set 755 on the /cache and /temp and the tinthumb, buuuuut no change, so i tried the 777 and thats where i settled on. It seems timthumb is conspiring against me. I would love more suggestions kind sir….

  92. Awanes January 30, 2012 at 11:28 am #

    Did everything like you said, checked everything, searched on google, nothing works. Using online wordpress, there’s just not image specified all the time on any post.

  93. On Festin February 6, 2012 at 10:48 am #

    Images are not loaded in my site as well. Can you please check?

  94. Arpita February 8, 2012 at 6:09 pm #

    Now I know what is preventing it. It’s not allowing because in our WHM, we have mod_security module installed which thinks that it is “PHP Injection attempt in URI”. so it prevents it to display images. can anyone tell me how to allow url passing in the url for only one website from cpanel/whm?

    The error in mod_security plugin says:

    Access denied with code 403 (phase 2). Pattern match “(?:ogg|gopher|zlib|(?:ht|f)tps?)\:/” at ARGS:src. [file “/usr/local/apache/conf/modsec_rules/10_asl_rules.conf”] [line “199”] [id “340026”] [rev “19”] [msg “PHP Injection attempt in URI”] [severity “CRITICAL”]


  95. Euthenics February 14, 2012 at 9:13 am #

    Hi Riyad

    Ever since moving a client site (news.orenity.com) from the main domain to the sub domain, something weird where not all the thumbnails are appearing. The script is working fine but for some strange reason, some of the thumbnails are not appearing while the others are working fine.

    Anybody has any clue on what seems to be the problem and encountered this problem before?

    • Riyad Kalla February 16, 2012 at 10:18 am #

      Have any specific examples?

      • Euthenics February 17, 2012 at 2:26 am #

        Hi Riyad

        If you go to the site (news.orenity.com), you’d be able to see where some thumbnails appeared in the post and some don’t. I can’t seem to figure out where the problem lies.

        Thank you in advance.

  96. Nicklas February 16, 2012 at 10:47 am #


    I seem to have a problem with this as well. Have been struggeling for hours trying different solutions.

    My cache folder is chmodded to 777, I’ve updated my timthumb.php with the latest code, all my images are stored on server. THey simply just don’t get added as a featured image :( I can select it and set it to be featured image, and information is stored, but image not displayed when I go to my main page.

    Also, I should mention that I’m using the journalcrunch theme and WP 3.X.

  97. Mirko February 20, 2012 at 5:07 pm #

    Brillian Ryiad Exactly what I was looking for. Now I’ll try to implement :)

  98. Pablo February 28, 2012 at 10:09 am #

    Hi! I’m Pablo from Buenos Aires, Argentina. Thank you for helping us with this.
    I read all the posible solutions people posted here. Not working for me. None of them.

    Let me show you, cause it’s interesting:


    As you can see this theme has a feature that lets you click on the image to see it bigger, very professional. If you click in the error images, you actually see the bigger ones. And in adition to that, if you check at the right side bar, you’ll see another thumbnail that work! (like UFC Undisputed or Binary Domain, top right) IN THE SAME PAGE! its crazy.

    I really dont know much about PHP (honestly, nothing at all), but i’ve tried all (chmod 777 cahe, etc) I actually downloaded a plugin for WP that upgrade your timthumb.php file… Could see it for a minute, please? I’ll be very grateful.


  99. Gabi Sap February 28, 2012 at 5:09 pm #

    Hello Riyad,

    I’m sorry if somebody had the same problem but the comments are too many to follow.

    I have a theme installed that is using timthumb. The thumbs are not showing and when I open the images in another window I have this link http://…./timthumb/timthumb.php?src=Array&w=940&h=400&zc=1 so I gues that src=Array… it should be the path of the file.
    And the error:
    A TimThumb error has occured

    The following error(s) occured:
    Could not find the internal image you specified.

    Query String : src=Array&w=155&h=60&zc=1
    TimThumb version : 2.8.9

    Can you help me or point me to do something because I’m stuck…

  100. Syakir March 1, 2012 at 4:34 pm #

    Guys help me with this …

    I have problems, when I right click and view the image in other tabs, this message appear :

    remote host “3.bp.blogspot.com” not allowed
    Query String : src=http://3.bp.blogspot.com/-5JsJANJ8O50/Toydh7qlfbI/AAAAAAAADM0/hFBticgo1n8/s1600/Gambar%2BRumah%2BMinimalis-6.jpg&h=345&w=620&zc=1
    TimThumb version : 1.26

    what exactly I need to do ..

  101. wiwa March 2, 2012 at 5:41 am #

    Images not show


    I make the images show manually in fron page

    I tried to change permissions..no help.

    Can someone help me? Please.

    Br Wiwa

  102. Nishant March 7, 2012 at 8:16 am #

    Hello, same issue here: thumbnails don’t always get generated but the image exists, i dont get a 404.

    Link here: http://www.lunadirimmel.it

    I also changed my temp – cache folder rights to 777 but it is still not working.

    What can I do? Thanks in advance

    • massimo March 29, 2012 at 12:22 pm #

      Sei riuscito (credo) a far funzionare timthumb.php sul tuo wordpress.. posso chiederti come hai fatto? Magari è una stupidata che mi sta sfuggendo..

      Anche io permessi 777 su cache, gd libraries installate e safe mode disattivato.. ma niente da fare.


  103. Joachim March 11, 2012 at 3:33 am #

    Thanks! My “cache” folder had CHMOD 755, i changed it to 777, and now its working!

  104. de March 27, 2012 at 5:05 am #

    work now for multi-site : http://www.letuslook.nl/how-to-make-timthumb-work-in-wordpress-multisite/

  105. Phelan April 4, 2012 at 10:31 pm #

    Riyad, I had this exact same problem with BlueHost and the WooThemes BizNizz theme. CHMOD777 didn’t work for me but switching over from PHP5 to PHP5 (FastCGI) solved this issue immediately.

  106. Linderox April 26, 2012 at 3:55 am #

    the same problem. didn’t appears thumbs.

    it’s an answer from server.

    myip – – [26/Apr/2012:05:56:03 -0400] “GET /wp-content/themes/jungleland/scripts/timthumb.php?src=http://antonmislavsky.ru/wp-content/themes/jungleland/scripts/12.jpg HTTP/1.0” 403 251 “-” “Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0”

    file exsist, without parameters timthumb works, and jpg file shows

    I tried different folders , permissions, htaccess security off module, but nothing happend

  107. John Bonna May 21, 2012 at 5:24 am #

    The link below solved my problem. My site runs on Nginx not Apache, so i don’t know if is gonna work for apache.



  108. Vashil Prasad June 2, 2012 at 3:38 pm #

    Hey guys same problem here…Check out my screenshot:


    Do let me know


  109. Robert June 5, 2012 at 11:38 pm #

    Had lost 2 hours on this. Here is my sollution:

    Server didn’t return the right DOCUMENT_ROOT, so in thumb.php I had to add

    $_SERVER[“DOCUMENT_ROOT”] = ‘/domains/www/public_html’;

    In my case I’ve looked for the DOCUMENT_ROOT with
    echo getcwd();

  110. Phillip June 6, 2012 at 5:38 am #

    I am having the same problem but only with one site in my multi-site setup and the developr for the theme refuses to give any support. Right now I just have the theme set up a on a site that is built out:


    As you can see the image doesn’t show. Again, this is not a probably with any of my other themes or plugins that use TimThumb. I have changed all the permissions to 777 then to 755 but nothing. Any advice would be hugely appreciated!!!

  111. Reggie Scott June 25, 2012 at 7:06 pm #

    A true wealth of information here. Tried almost everything listed and still could not get my images on the home page to load. I moved this site over to Hostgator and now the images do not load. Here is the site in question on Hostgator:

    and here is the site on another server where the images DO load:

    Any help will be GINORMOUS to me! Thanks!

  112. troypc July 5, 2012 at 9:10 am #

    i wantto say thank you. i solve my problem.

    • Kajal June 10, 2013 at 4:25 am #


      If you have not solved the problem yet..
      Go into timthumb.php.
      Find the function protected function getLocalImagePath($src)
      after $src = ltrim($src, ‘/’); line
      add $src = substr($src, 10); // 10 is charcter count of subfolderpath i.e after ~ sign. so in your case it should be 9 (~gdavila/).
      Hope this helps


  113. Adam Johnson July 16, 2012 at 12:34 pm #

    I had a problem where some of the thumbnails got created ok and some didn’t get created at all, I didn’t upload the original images so I didn’t take into account how big they would be.

    After I looked at some of the image sizes I worked out that I needed to adjust the allowed memory limit in order to allow all the thumbnails to get created.

    The real solution should be for me to shrink the image sizes as some of them are almost 10mb in size, but adjusting the memory limit setting works for now.

    So for anybody having the problem where some thumbnails get created and some don’t try adjusting your memory limit setting found at the top of thumb.php or timthumb.php

    if(! defined(‘MEMORY_LIMIT’) ) define (‘MEMORY_LIMIT’, ’90M’); // Set PHP memory limit

    I think the default is 30M, I changed it to 90M.

    Note: if a jpeg is 10mb in size that doesn’t mean it will be 10mb in memory, the jpeg needs to get converted into a bitmap (in memory) before it can be used. A 10mb jpeg can actually take up 90mb in memory.

    • Tim Wright February 3, 2013 at 9:56 pm #

      I am having the same problem. Some of the thumbnails got created ok and some didn’t get created at all. I increased the memory limit to 120M. I appear to STILL be missing thumbnails occasionally :( any other ideas??

  114. Cartoni Animati August 20, 2012 at 5:25 am #

    thank you, i solved all my problem

    site: http://www.streamingreload.com/serie-televisive/telefilm/i-cesaroni.html

  115. uday September 1, 2012 at 1:14 am #


    Thank you so much man… It helped me to fix my issue..

  116. Doug September 26, 2012 at 8:39 am #

    I’m having what seems to be a timthumb issue and neither my hosting nor the theme dev seems to be able to help yet. I had a malware attack last week and all is clean but my slider images will not display.

    I’m absolutely stuck. It sure seems to be timthumb but I have no idea what to do. Timthumb is running with the same host on my other sites with no problem. It’s there. It’s up to date. There was malware found in a scan last week but it’s been all cleaned and I’ve still got the problem.

    The site is at http://www.leannebrownoff.com

    All theme, plugin and WordPress installs are up to date.

    Wow, if you could help, that’d be sweet.

  117. HK September 26, 2012 at 9:23 am #

    I’m having issues with my TimThumbs here http://www.memoirsofaseductionist.com

    Any help would be greatly appreciated.

  118. rKm November 1, 2012 at 12:15 pm #

    Heads up to the cpanel users.

    I also ran into this problem. For me, it ended up being caused by my changing the php5 handler from ‘dno’ over to ‘suphp’. This setting is located in the ‘Configure PHP and suEXEC’ section in the cpanel.

    Once I turned it back to ‘dno’, all was right in the world again. I hope that helps out someone out there.

  119. tom November 2, 2012 at 11:31 am #

    I bought a theme for my wordpress site and not been able to get the images to render using the developers timthumb functionality.

    Any ideas where to start?

    My website is http://www.feedcopy.com

  120. Cory Crabtree December 21, 2012 at 8:36 am #

    Hello Riyad,

    Purchased a theme a year ago from Templatic and had it running beautifully until I migrated to a new server and upgraded to WP 3.5. I have updated Tim Thumb, chmod 777 to cache and temp, enabled PHP GD (/testgd.php) and deleted and re-uploaded images but still cannot find the problem. Images work if they are inserted into pages or posts but not if I allow the theme to generate thumbnails.

    If you can take a look my site is http://www.RachaelsTable.com

    Many thanks

  121. Matt January 13, 2013 at 12:45 pm #

    I have also had this problem, after sometime of changing permissions etc, I decided to look at my .htaccess (Apache Users Only) and some of the rules I have in there are to prevent people from snooping, blocking bad user agents and a few caching and url rewriting things as well.

    If you still cant figure out how to get this working I suggest that you have a look at your .htaccess. Perhaps the easiest way to start with is to rename it to .htaccess.bak and then see if it starts working, if it does then it is something within the .htaccess that is causing your problems with timthumb.

    Hope this helps.

  122. Galeno January 16, 2013 at 1:13 pm #

    Okay, I found your post very usefull, but as I’m not skilled wiith PHP, I couldn’t make the thumbnails work it. Maybe you can help me?

    Here’s the link to my timthumb.php script:

    Currently the error says:
    “A TimThumb error has occured
    The following error(s) occured:
    No image specified”

    I googled and tried many solutions, but nothing seems to work :/

    Thanks in advance =]

  123. echi February 27, 2013 at 5:54 am #

    I use filezila for ftp access but can’t find the cmod or timhumb.php in /content/theme/theme-name folder pls what software do you use, thumbnail image on http://www.buyngproperties.com shows no image specified but shows on it’s orrignal page, how do I correct this problem.

  124. makarena March 12, 2013 at 7:04 pm #

    I really need your help, I have had many problems with this damn script and I can not make it work!! sometimes displays images sometimes not.

      in the error log shows me this:
    [Tue Mar 12 23:01:05 2013] [error] [client] (12) Can not allocate memory: could not create child process: / opt / suphp / sbin / suphp for / home / metdesig / public_html / index.php, referer: http://www.metdesigns.cl/bienvenido/?portfolio=anti-aging
    [Tue Mar 12 23:01:05 2013] [error] [client] (12) Can not allocate memory: could not create child process: / opt / suphp / sbin / suphp for / home / metdesig / public_html / welcome / wp-content / themes / SmartScreen / scripts / thumb.php, referer: http://www.metdesigns.cl/bienvenido/?portfolio=anti-aging

    and a long list of the same error every time … could you help me please!??

    • Matt March 23, 2013 at 4:12 pm #

      Are you using a VPS? or are you on shared hosting? Do you use cPanel? AFAIK this is a problem for your host to solve as it says you are running out of memory. How many plugins etc do you have perhaps try disabling them all and try enabling one by one to see if you still have the error.

      If it is a vps server or shared hosting, you may not have enough ram or the server may be oversold! Just my two pence worth.


  125. anurag June 16, 2013 at 7:48 am #

    when i hosted it locally it didn’t created a single problem but when i hosted on server it stopped displaying thumbnails(doesn’t show featured image)

    link: http://hub4techie.com/wordpress/?cat=3

    i tried all updating with latest timthumb.php, changing permissions but it didn’t solve my problem
    the thing that’s really annoying me is, its running smoothly on local server but not on web server

  126. Vooodoo June 27, 2013 at 6:49 am #

    Hello !
    Just solved my this problem :

    That was the .htaccess.
    There was a lot of security stuff in it from this plugin : http://wordpress.org/plugins/better-wp-security/

    I just tried to get back to the old .htaccess and that was the end !
    If you lost a lot of time you should try …

  127. Simplicity July 25, 2013 at 2:58 am #

    Thanks, it helped alot.

  128. whoiam November 14, 2013 at 1:21 am #

    Thx !

  129. David Lara December 13, 2013 at 10:49 am #

    I have a theme called Shuttershot and it works great. however I’ve never been able to get the feature images to come up on the blog and archive result pages ( http://www.laraphoto.com/blog ). Does this have anything to do with the TimTumb funcation?

    TimThumb.php seems to work http://laraphoto.com/wp-content/themes/Shuttershot/timthumb.php

    Any help would be great.

  130. Deidre September 9, 2014 at 9:20 pm #

    Thanks for sharing your thoughts about centos.Regards

    Also visit my blog: apostar

  131. Afif August 23, 2015 at 8:54 pm #

    please help me my web error

    [24-Aug-2015 02:01:56 UTC] PHP Warning: filesize(): stat failed for http://videobaru.com/timthumb.php?src=/uploads/no_image.png&w=40&h=60 in /home4/afifvilla7/public_html/videobaru.com/timthumb.php on line 1243


  1. How to Fix WordPress PHP Warning “headers already sent” | The Buzz Media - August 12, 2010

    […] those of you familiar with the requirements for TimThumb to work correctly you know that it creates a “cache” and sometimes a “temp” subdir wherever […]

  2. Fix for Wordpress Theme Thumbnails (thumb.php) Not Showing | Blogging For Novice - January 18, 2011

    […] Source ] Share and […]

  3. Minneapolis WordPress Developer :: Using TimThumb.php on WordPress Network | Spenser Baldwin - May 20, 2011

    […] correct the issue.  More conversation on setting up TimThumb.php and troubleshooting can be found here.  If you’re running WordPress Network, each theme will have to be corrected individually. […]

  4. test post 2 | Studio NvN - October 12, 2011

    […] to know how to configure TimThumb to resize images from a different domain (e.g. static.mydomain.com and mydomain.com), fortunately he found the solution online […]

  5. Wordpress TimThumb ERROR / Blogumda Resimler Gözükmüyor | Web Tasarım Ankara - October 25, 2011

    […] http://www.thebuzzmedia.com/tip-for-timthumb-thumb-php-not-generating-thumbnails/ Tarih: Ekim 25th, 2011 – Kategorisi: Blog – Yazar: admin – Etiketler: blog hatası, blogda resim […]

  6. Tip for TimThumb (thumb.php) not Generating Thumbnails | Qingli Liu - March 28, 2012

    […] ridhoyp wanted to know how to configure TimThumb to resize images from a different domain (e.g. static.mydomain.com and mydomain.com), fortunately he found the solution online […]

  7. tedxdt : Hub 4 Techie - June 16, 2013

    […] TimThumb ERROR / Blogumda Resimler Gözükmüyor | Web Tasarım Ankara – October 25, 2011[…] http://www.thebuzzmedia.com/tip-for-timthumb-thumb-php-not-generating-thumbnails/Tarih: Ekim 25th, 2011 – Kategorisi: Blog – Yazar: admin – Etiketler: blog hatası, blogda […]

  8. Djleak Website | Computer DJ Midi - July 1, 2015

    […] Tip for TimThumb (thumb.php) not … – 22.05.2010  · This tip is for anyone using TimThumb (aka "thumb.php") either directly or indirectly via a WordPress theme (WooThemes uses it a lot) and is not … […]

  9. Cpanel Add Gd Library | Code Bliss - July 25, 2015

    […] Tip for TimThumb (thumb.php) not Generating Thumbnails – 2010-05-22  · I thought of that before but for the life of me couldn’t find the log file… in cPanel they actually have a log checker so you don’t have to open any … […]

  10. Hostgator Secfilterscanpost Off – Cyber Sun - August 24, 2015

    […] Tip for TimThumb (thumb.php) not Generating Thumbnails – May 22, 2010  · This tip is for anyone using TimThumb (aka "thumb.php") either directly or indirectly via a WordPress theme (WooThemes uses it a lot) and is not having their […]

Leave a Reply