Vimeo thumbnail image, issue with loadtime
I'm fetching thumbnails for vimeo movies. These are displayed on the
startpage. When I click on an image I'll get to a certain page where the
video is found and can be played.
The problem is on the startpage, since I have alot of thumbnails it takes
a long time to load the page. Any suggestions on how to minimize loadtime?
Heres the code:
<?php
global $id;
$the_id2 = get_the_ID();
$args3 = array(
'depth' => 2,
'child_of' => $the_id2,
'exclude' => '',
'include' => '',
'title_li' => '',
'parent' => $the_id2,
'echo' => 0,
'sort_column' => 'menu_order',
'post_status' => 'publish'
);
$pages_get_2 = get_pages($args3);
foreach($pages_get_2 as $pages_display_2) {
$content = $pages_display_2->post_parent;
$content = apply_filters('the_content', $content);
$imgid54 =
get_post_meta($pages_display_2->ID,'video',true);;
$hash =
unserialize(file_get_contents("http://vimeo.com/api/v2/video/$imgid54.php"));
echo get_page_link($pages_display_2->ID) ?>"><img
src="<?php echo $hash[0]['thumbnail_large']; ?>"
alt="" class="alignnone size-full noborder"
/><h2><span class="bvssp-projects-text"><?php echo
$pages_display_2->post_title ?></span></h2></a>
<?php } ?>
Yes, I use WordPress.
Kind regards Johan
No comments:
Post a Comment