2

I am using timthumb to present images inside a Wordpress theme. It works fine when showing images from the same server but as soon as I try to load external images (in this case youtube thumbnails) it returns a 404 as if the script itself couldn't be found. The script is there though, if I load local images it behaves as expected. I have t set to allow external images, and specifically those from img.youtube.com

The strange thing is the exact same theme works as expected on my localhost and the external images show up fine, so I'm guessing it's something wrong on the hosting. Any suggestions as to what this may be?

artparks
  • 761
  • 1
  • 10
  • 24
  • I have the same problem - did you solve this yet ? – aghoshx Feb 14 '13 at 19:19
  • no - when I uploaded to the live server it started working again so i stopped worrying about it. leads me to believe it was an issue with the hosting so contact your host? it was on hostgator FYI – artparks Feb 28 '13 at 16:16
  • I had to write a function to fetch the image from youtube, cache it locally and then feed timthumb the local url to make it work :( – aghoshx Mar 06 '13 at 14:17

2 Answers2

0

IS your host allows to load images from external source. means out side of server ? This may be a problem.

Savan Koradia
  • 127
  • 3
  • 14
0

HostGator do not allow absolute paths to use with TimThumb (even if it's hosted in your own account) as described in this article: http://support.hostgator.com/articles/specialized-help/technical/timthumb-basics.

To fix the absolute path issue, you'll would need to hack your theme functions to strip off your domain from the image path:

$url = "/path/to/timthumb.php?src=" . str_replace(site_url(), '', $path_to_image);
CincauHangus
  • 431
  • 3
  • 21