My favorites | Sign in
Project Home Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 363: Could not find the internal image you specified
12 people starred this issue and may be notified of changes. Back to list
Status:  NotBug
Owner:  ----
Closed:  Dec 2012

Sign in to add a comment
Reported by, Apr 3, 2012
What steps will reproduce the problem?
1. There are no steps to reproduce the problem, have a look at
2. Here you will see the images on the home screen are not appearing.
3. This only happens with images that are host on the site, I can run the script ( from the site ) referencing external images and there is no issue. 

What is the expected output? What do you see instead?
I'm expecting to see the images resized according to the parameters I set. I'm not seeing any image at all.

What version of the product are you using? On what operating system?
I'm using the latest version of the product, 2.8.10

Please provide any additional information below.

Apr 3, 2012
I'm using nginx.
Apr 13, 2012
I am also facing this problem with my wordpress installation, please help me too.
Apr 19, 2012
#3 ashizak916
i am also facing error
 my site showing this
A TimThumb error has occured

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

Query String :
TimThumb version : 2.8.10
Apr 27, 2012
I have the same trouble, i have tried with the fixes from previous posts, and they have not worked any of them, the only thing i know is that you have to elimante the address from the url, for examples instead of saying it should look src=wp-content%2Fuploads%2F2012%2F04%2Fcentos.png&h=309&w=640&zc=1 but i dont know php

May 3, 2012
Same problem here!! It's so sad that such a good script has so many problems to work easily... On the official page there's no reference what so ever to this problems. And not a word from the developers
May 4, 2012
I am having the same problem as well.  I think it has to do with using multisite in wordpress though.  I am working on a solution trying to make it so timthumb gets the right url for the image.
May 4, 2012
Hopefully this will help someone.  It probably is not the best solution, but it got it to work for me.  If you are using multisite with wordpress and are getting the TimThumb error where it cannot find the internal image you specified then try this:

You may be currently linking your image like this:
<img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php get_image_url(); ?> />

This will use a filtered link, and not the actual path to the image file.  

To unfilter it try using this:
<?php $image = get_attached_file( get_post_thumbnail_id( $post->ID ), true ); ?>
<img src="<?php bloginfo('stylesheet_directory'); ?>/timthumb.php?src=<?php echo $image; ?> />

The get_attached_file( $attachment_id, $unfiltered ); function can return an unfiltered image url which worked in my case.

Happy Coding.

May 4, 2012
My $_SERVER['DOCUMENT_ROOT'] is appending a underline after the server path (timthumbs.php, line 799). I don't know why. 
To workaround this issue, I simply remove the underline using the bottom code.
I know that this is not the best option but works for me.

put this code:
$docRoot = substr($docRoot, 0, strlen($docRoot) - 1);

immediately before this code (line 845):
$this->docRoot = $docRoot;
May 7, 2012
use this, it's an old version but surely it wont have the same mistakes as the new version, i dont know if it has bugs, but it works thats what matter to me
19.6 KB   View   Download
Jul 23, 2012
The solution from comment#9 worked well for me.
Is there any functionality or security problem having to do with using this reduced/older version of timthumb? 
Sep 6, 2012
Same problem but now with the .php of the comment #9 it works!!!
Sep 21, 2012
Comment #9 works after an hour or so trying to figure it out, thanks!
Sep 24, 2012
Ty  #9 ! 
Sep 25, 2012
I can't see what version #9 has posted here. The oldest safe version is 2.8.2. Anything older than this is vulnerable
Oct 13, 2012
Thank you Comment 9. It works
Oct 26, 2012
comment#9 thank you... It works for me... I think the old much work fine and rid the new version :) rockpinoy
Oct 31, 2012
#18, so how do you make change to get it work?
Oct 31, 2012
#7, where do you put this line?
Oct 31, 2012
Found solution:

I was able to fix my issue by doing TWO things.

I turned this line to true: [line 33]

if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES', TRUE);	// Less secure.

and I commented out this line [line 212]
//$this->src = preg_replace('/https?:\/\/(?:www\.)?' . $this->myHost . '/i', '', $this->src);

Whether or not this is an appropriate way, it is the fix I found to work after 8+ hours of troubleshooting.

Hopefully this helps some people!

Nov 4, 2012
Nov 8, 2012
My using it on my own mvc the url of the image is something like this

 can some body please help me with this :( 

Nov 26, 2012

Comment 23 by, Oct 31, 2012

Nov 29, 2012
Comment 9 work fine ! thanks for that, that's only what counts. 
Dec 3, 2012
Project Member #28 BinaryMoon
(No comment was entered for this change.)
Status: NotBug
Dec 25, 2012
line number 825
comment $docRoot = @$_SERVER['DOCUMENT_ROOT'];
and add $docRoot = dirname(__FILE__);
Jan 10, 2013
Thank you Comment 23. It works.


Jan 25, 2013
NotBug? of course that is a bug...
Feb 8, 2013
Had the same error. My error was simply the filename of the pic. There was a "+" at the filename. "pic123+internet.jpg" after renaming "pic123internet.jpg" all works fine.

Feb 19, 2013
#23 - Thank you! :)
Apr 1, 2013
#34 ikadimi
I you it on WordPress Network, you will have to fix your theme as described here:

This error is caused by the way WordPress Network delivers attachements in blogs, i.e, this line in .htaccess:

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

So beware theme designers, make your themes WP Network ready, it's not very hard.
Apr 1, 2013
#35 ikadimi
Me again (#34). On a second thought, I don't like to expose the real paths to files. So you can always simply disable replacing current host and add it dynamically to allowed sites with these two steps:

== STEP 1 ==
comment out line 212 or so depending on your version (I'm on version 2.8.11), the line is:
		$this->src = preg_replace('/https?:\/\/(?:www\.)?' . $this->myHost . '/i', '', $this->src);

== STEP 2 ==
Use your IDE search function and look for "flicker", and add a line above, like so:
if(! isset($ALLOWED_SITES)){
	$ALLOWED_SITES = array (
		preg_replace('/^www\./i', '', $_SERVER['HTTP_HOST']), 
Apr 1, 2013
#36 ikadimi
@BinaryMoon - #28 - I'm gonna agree with you.
Apr 22, 2013
Comment #23 worked for me, thanks!
Apr 22, 2013
Comment #23 worked for me too!!!
Apr 22, 2013
#39 anonymous84327
@BinaryMoon (#28) it's nice from you to come here and just tag this as "NotBug" however there is clearly something wrong to investigate and many people here are willing to help solving this issue. You don't even put any comment to justify your decision, this is just wrong closed minded way of acting/thinking, you should either not be part of the project, or your project should not be declared as Open Source and listed on Google Code if you're not willing to recognize and help solving real bugs like this very one.
Jul 4, 2013
Comment #23 work for me too.

Jul 14, 2013
#29 worked for me
Aug 26, 2013
#23 worked for me!! here I attach my working file.


Juan M. Sánchez
Web Designer
50.6 KB   View   Download
Sep 6, 2013
#43 leonardo.ciaccio
Hi all,
i have hosted my site on and i have found this solution, only comment:

$docRoot = @$_SERVER['DOCUMENT_ROOT'];

//$docRoot = @$_SERVER['DOCUMENT_ROOT'];

on this post

Work fine for me, i hope this help.

Leonardo Ciaccio
Sep 10, 2013
Thank #43 leonardo.ciaccio

It's work.
Nov 22, 2013
#9 Can anyone tell me where I need to put that .PHP file the user kindly uploaded for us?
Dec 12, 2013
#42 copy worked for me. Was about to throw my laptop against the wall. Thank you Juan
Jan 24, 2014
thanks #9 wworks for me too 
Feb 19, 2014
Thank you very much, perfect solution for who's on Altervista :)

After many hours got miniatures working :)

Really thank you!
Jun 11, 2014
#23 thank you very much man! it worked!
Jun 16, 2014
Thank you! #9 worked fine!
Aug 6, 2014
Sign in to add a comment

Powered by Google Project Hosting