image_downsize

FUNCTION wp-includes\media.php (ligne 171) github
Scales an image to fit a particular size (such as 'thumb' or 'medium'). The URL might be the original image, or it might be a resized version. This

Paramètres

Entrée :
$id, $size = 'medium'
Sortie :
@param int          $id   Attachment ID for image.
@param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array
@return array|false {

Utilisation

// Utilisation de la fonction image_downsize
$result = image_downsize($id, $size = 'medium');

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...