function ImageFactory::getSupportedExtensions
Same name in other branches
- 9 core/lib/Drupal/Core/Image/ImageFactory.php \Drupal\Core\Image\ImageFactory::getSupportedExtensions()
- 8.9.x core/lib/Drupal/Core/Image/ImageFactory.php \Drupal\Core\Image\ImageFactory::getSupportedExtensions()
- 10 core/lib/Drupal/Core/Image/ImageFactory.php \Drupal\Core\Image\ImageFactory::getSupportedExtensions()
Returns the image file extensions supported by the toolkit.
Parameters
string|null $toolkit_id: (optional) The ID of the image toolkit to use for checking, or NULL to use the current toolkit.
Return value
array An array of supported image file extensions (e.g. png/jpeg/gif).
See also
\Drupal\Core\ImageToolkit\ImageToolkitInterface::getSupportedExtensions()
File
-
core/
lib/ Drupal/ Core/ Image/ ImageFactory.php, line 100
Class
- ImageFactory
- Provides a factory for image objects.
Namespace
Drupal\Core\ImageCode
public function getSupportedExtensions($toolkit_id = NULL) {
$toolkit_id = $toolkit_id ?: $this->toolkitId;
$definition = $this->toolkitManager
->getDefinition($toolkit_id);
return call_user_func($definition['class'] . '::getSupportedExtensions');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.