public function GDToolkit::getMimeType in Drupal 9
Same name and namespace in other branches
- 8 core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php \Drupal\system\Plugin\ImageToolkit\GDToolkit::getMimeType()
Returns the MIME type of the image file.
Return value
string The MIME type of the image file, or an empty string if the image is invalid.
Overrides ImageToolkitInterface::getMimeType
File
- core/
modules/ system/ src/ Plugin/ ImageToolkit/ GDToolkit.php, line 384
Class
- GDToolkit
- Defines the GD2 toolkit for image manipulation within Drupal.
Namespace
Drupal\system\Plugin\ImageToolkitCode
public function getMimeType() {
return $this
->getType() ? image_type_to_mime_type($this
->getType()) : '';
}