Welcome! To use this support forum, please Login or Join Today!

   

“Slider” Not Working - Not sure how to implement solution offered by my CDN.

{name}
Rank

Total Posts: 1

Joined 2013-05-02

PM

 

I initially thought SLIDER NOT WORKING was an issue was with my CDN. (maxcdn.com)

However…after Extensive Trouble Shooting with MaxCDN gave me these replies.

REPLY 1:

“I have checked your W3TC configuration, rejected slider files, try turning CDN off, and the issue still persisted. Conclusion to this is that this is not CDN issue, but the theme issue, particularly problem with the loading of this image from the external site. If you go to the thumb image directly: http://glennlawfirm.com/wp-content/themes/onyx/thumb.php?src=https://i2.wp.com/glennlawfirm.com/wp-content/uploads/2013/02/Dallas-Brain-Injury-Lawyer.jpg?fit=1024,1024&h=150&w=200&zc=0&q=90 you will see the reasons and solutions to this issue. It is because timthumb can not load image from that external site.

> > Try to correct this and set those values, and of course feel free to reach us if you need anything else. Also, I have done checks in your W3TC and everything is optimized as it should regarding CDN side.”

REPLY 2:
“in this case thumb.php is trying to load image which is coming from http://i2.wp.com/glennlawfirm.com/wp-content/uploads/2013/05/Dallas-Brain-Injury-Attorney.jpg (<—this is not CDN and neither your origin website), and because it can not fetch anything from external sites it will not load your thumbnail, and thus produce missing image (thumbnail) on your webpage.

Solution to this is to edit thumb.php to load it from external sites, just by altering $ALLOWED_SITES or set ALLOW_EXTERNAL=true.”

Thanks…Brian

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

Thanks for sharing, however I don’t recommend the wildcard method as this would allow any and all sites to access timthumb with write access to your server. If you look further down in thumb.php at the $ALLOWED_SITES array, you can specify trusted sites. This example allows common image sharing sites and the WordPress CDN Jetpack servers only:

// If ALLOW_EXTERNAL is true and ALLOW_ALL_EXTERNAL_SITES is false, then external images will only be fetched from these domains and their subdomains.
if(! isset($ALLOWED_SITES)){
 $ALLOWED_SITES = array (
  'flickr.com',
  'staticflickr.com',
  'picasa.com',
  'img.youtube.com',
  'upload.wikimedia.org',
  'photobucket.com',
  'imgur.com',
  'imageshack.us',
  'tinypic.com',
  'i0.wp.com',
  'i1.wp.com',
  'i2.wp.com'
 );
}

I’m not implying these are all safe, as I’ve been attacked by a “flickr.com/file.jpg.php” file in the past. My advice is to only allow the ones you’re definitely using.


In your case, this may be your best bet:

// If ALLOW_EXTERNAL is true and ALLOW_ALL_EXTERNAL_SITES is false, then external images will only be fetched from these domains and their subdomains.
if(! isset($ALLOWED_SITES)){
 $ALLOWED_SITES = array (
  'i0.wp.com',
  'i1.wp.com',
  'i2.wp.com'
 );
}

 

{name}
Rank

Total Posts: 1

Joined 2013-05-02

PM

 

Casey,

Thanks for quick reply…

Is there anyway I could get some help “locating” timthumb…and editing it.

I’ve searched for it via FTP, to no avail…as mentioned before, I am using a CDN.
I can provide login credentials.

Thanks again…Brian

{name}
RankRankRankRank

Total Posts: 3667

Joined 2011-04-27

PM

 

You should be able to access it either via FTP:
wp-content/themes/onyx/thumb.php

Or within your WordPress admin:
Appearance → Editor → thumb.php.