Available on: Newspaper V11+

This api call is used to update only one of the parameters of an existing thumbnail.


<?php td_api_thumb::update_key( $id, $key, $value ) ?>


$id (string) (required)

  • the thumbnail id – has to match with one of the thumbnails which are already registered in the theme

$key (string) (required)

  • parameter to be replaced, in the following table you can see all parameters but only one can be used because via this method you can update only one parameter:
Key name
name string the thumbnail name
width integer the thumbnail width in pixels
height integer the thumbnail height in pixels
crop mixed the cropping method (array, true or false), it is passed to the add_image_size() function, for more information check the following resources – functionextra
post_format_icon_size string specify what play icon to load for video posts (small or normal)
used_on array the locations on which thumb appears, it’s just an info and appears in Theme Panel -> Block Settings

$value (mixed) (required)

  • the data which will replace the parameter existing one, it’s type depends on the selected parameter.


In the following example we’ll update the existing Thumbnail 150×0 ,  the ‘crop’ key data will be replaced, you can see how the code looks on plugin, ex:

td_api_thumb::update_key('td_150x0', 'crop', true);