You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run isle-dc, when going to add image via https://islandora.traefik.me/media/add/image it only provides 4 options. Allow types: png gif jpg jpeg in image uploader widget. Same thing, when we edit it from the node (i.e remove the image, then add it back).
4 file extension option is set in \Drupal::service('image.factory'), if we look in to the web/core/modules/file/file.module
We found:
It seems the image factory used in this case is \Drupal\system\Plugin\ImageToolkit\GDToolkit.php. In its supportedTypes() function only PNG, JPEG, GIF, and WEBP are listed.
public static function getSupportedExtensions() {
$extensions = [];
foreach (static::supportedTypes() as $image_type) {
// @todo Automatically fetch possible extensions for each mime type.
// @see https://www.drupal.org/node/2311679
$extension = mb_strtolower(image_type_to_extension($image_type, FALSE));
$extensions[] = $extension;
// Add some known similar extensions.
if ($extension === 'jpeg') {
$extensions[] = 'jpg';
$extensions[] = 'jpe';
}
}
return $extensions;
}
protected static function supportedTypes() {
return [IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_GIF, IMAGETYPE_WEBP];
}
To reproduce:
Run isle-dc, when going to add image via https://islandora.traefik.me/media/add/image it only provides 4 options.
Allow types: png gif jpg jpeg
in image uploader widget. Same thing, when we edit it from the node (i.e remove the image, then add it back).4 file extension option is set in \Drupal::service('image.factory'), if we look in to the web/core/modules/file/file.module
We found:
It seems the image factory used in this case is \Drupal\system\Plugin\ImageToolkit\GDToolkit.php. In its supportedTypes() function only PNG, JPEG, GIF, and WEBP are listed.
The Workaround:
... we have
Ongoing Issuees:
Resource links
https://www.drupal.org/project/drupal/issues/3204467
https://www.drupal.org/project/drupal/issues/1014816#comment-7891559
The text was updated successfully, but these errors were encountered: