# get\_thumb

Function : get\_thumb\
File : functions\_videos.php\
Since : v2.x

This function is used to get thumbnails of a video.

This function will get all video thumbnails and list them in array, you can single thumbnail using incremental number or all thumbnails in an array or just count how many thumbnails are available. This function has few limitations that we will try to cover in upcoming updates.

**Usage**

get\_thumb($vdetails,$num=’default’,$multi=false,$count=false,$return\_full\_path=true,$return\_big=true,$size=Null);

**Uses**

* default\_thumb();
* MyQuery->get\_video\_details();

paramater marked with \* is required

| Parameter Name                | **Options**                                                                                                                                                                                                                                                                 |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| $vdetails (Array\|Int) \*     | It can either be an array of video details or just videoid and it will automatically fetch video details                                                                                                                                                                    |
| $num (Int)                    | incremental number of thumb, default is 1, depends on how many thumbs generation you have set, by default there are 3 thumbs that clipbucket generates so you can set this between 1 to 3.***if set to 2 it will return <http://website.tld/files/thumbs/filename-2.jpg>*** |
| $multi (Boolean)              | default is false, on setting true it will return a complete list of thumbs in an array.                                                                                                                                                                                     |
| $count (Boolean)              | default is false, if set to true, this function will only return number of thumbs of videos (int)                                                                                                                                                                           |
| $return\_full\_path (Boolean) | default is true, it will return thumbail with complete URL i.e *<http://website.td/files/thumbs/filename-1.jpg>*, if set to false it will only return *filename-1.jpg*                                                                                                      |
| $return\_big (Boolean)        | default is false, if set to true it will return big thumbnail of video, depends on what resolution you have set in configuration default is *320×240 and file name will be filename-big-1.jpg*                                                                              |
| $size (String)                | default is null, depends on what size you want, it can be 120×90 or whatever sizes you have set for thumbs generation                                                                                                                                                       |

#### Examples

```
<?php

	//set your videoid, it can also bevideokey
	$vid = 1236;
	$vdetails = get_video_details($vid);
	$default_thumb = get_thumb($vdetails);
	$second_thumb = get_thumb($vdetails,2);
	$all_thumbs = get_thumb($vdetails,NULL,true);
	$count_thumbs = get_thumb($vdetails,NULL,false,true);

	echo '<pre>';
	var_dump($default_thumb);
	var_dump($second_thumb);
	var_dump($all_thumbs);
	var_dump($count_thumbs);
	echo '</pre>';
?&gt
```

![](https://clipbucket.com/docs/wp-content/plugins/wp-postratings/images/loading.gif)Loading...


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.clipbucket.com/guides/functions/get_thumb.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
