function ImageInterface::resize
Same name in other branches
- 9 core/lib/Drupal/Core/Image/ImageInterface.php \Drupal\Core\Image\ImageInterface::resize()
- 8.9.x core/lib/Drupal/Core/Image/ImageInterface.php \Drupal\Core\Image\ImageInterface::resize()
- 11.x core/lib/Drupal/Core/Image/ImageInterface.php \Drupal\Core\Image\ImageInterface::resize()
Resizes an image to the given dimensions (ignoring aspect ratio).
Parameters
int $width: The target width, in pixels.
int $height: The target height, in pixels.
Return value
bool TRUE on success, FALSE on failure.
1 method overrides ImageInterface::resize()
- Image::resize in core/
lib/ Drupal/ Core/ Image/ Image.php - Resizes an image to the given dimensions (ignoring aspect ratio).
File
-
core/
lib/ Drupal/ Core/ Image/ ImageInterface.php, line 214
Class
- ImageInterface
- Provides an interface for image objects.
Namespace
Drupal\Core\ImageCode
public function resize($width, $height);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.