subbun
By:
subbun

A TimThumb error has occured to show external images link

October 26, 2015 955 views
WordPress PHP

getting error when I use timthumb.php to show the images..

A TimThumb error has occured

The following error(s) occured:
You may not fetch images from that site. To enable this site in timthumb, you can either add it to $ALLOWEDSITES and set ALLOWEXTERNAL=true. Or you can set ALLOWALLEXTERNAL_SITES=true, depending on your security needs.

TimThumb version : 2.8.10

1 Answer

Find this string in your timthumb.php:

// external domains that are allowed to be displayed on your website
$allowedSites = array (
    'flickr.com',
    'picasa.com',
    'blogger.com',
    'wordpress.com',
    'img.youtube.com',
);

And add the site you are trying to display images from to the list, then save and relaunch.

Have another answer? Share your knowledge.