I am working on localhost to develop a simple website using video_embed_field. Everything worked great right from the get go! Great module!
....But then when I was ready to test on my live site, my YouTube thumbnails would not show up when creating new videos. From deeper research I discovered that the thumbnails were not being downloaded to my website, and therefore could not be image cached into the thumbnail size I wanted.

I discovered this issue from Media_Youtube http://drupal.org/node/1180386#comment-5434644 which explains that drupal_http_request should be compatible with all installs rather than the use of copy(). Below is how I changed the code in video_embed_field.field.inc to test out if this was causing my thumbnails not to show up.

replaced:

@copy($thumb_url, $local_path);

with...

$response = drupal_http_request($thumb_url);
if (!isset($response->error)) {
   file_save_data($response->data, $local_path, TRUE);
}
else{
   @copy($thumb_url, $local_path);
}

I then resaved the content that was supposed to display the thumbnails.... and it worked!

I cant really explain why it works now, but im sure someone with better php skills can :)
I hope this helps someone who is having similar issues.

Comments

jec006’s picture

jec006’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.