public static function GDToolkitWebP::getSupportedExtensions in Picture 8
Returns a list of image file extensions supported by the toolkit.
Return value
array An array of supported image file extensions (e.g. png/jpeg/gif).
Overrides GDToolkit::getSupportedExtensions
File
- src/
Plugin/ ImageToolkit/ GDToolkitWebP.php, line 203 - Contains \Drupal\system\Plugin\ImageToolkit\GDToolkit.
Class
- GDToolkitWebP
- Defines the GD2 toolkit for image manipulation within Drupal.
Namespace
Drupal\picture\Plugin\ImageToolkitCode
public static function getSupportedExtensions() {
$extensions = array();
foreach (static::supportedTypes() as $image_type) {
if ($image_type == GDToolkitWebP::IMAGETYPE_WEBP) {
$extensions[] = 'webp';
}
else {
$extensions[] = Unicode::strtolower(image_type_to_extension($image_type, FALSE));
}
}
return $extensions;
}