diff --git a/composer.json b/composer.json index 3b749d1cbe2986b46383718241f84e3d31428e0d..7ea5f7710459a7003df132266ab5f3e97a97d8ba 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,8 @@ } ], "require": { - "drupal/core": "^8.8 || ^9", - "drupal/webp": "^1.0" + "drupal/webp": "^1.0", + "drupal/core": "^9.3 || ^10" }, "support": { "issues": "https://www.drupal.org/project/issues/webp_extras", diff --git a/src/Plugin/Filter/WebpImage.php b/src/Plugin/Filter/WebpImage.php index be056fa655949aac4dc3ad0f98a9fb439e056300..220a4b5315b3735b3c0ffd494021c4b8afd33f7b 100755 --- a/src/Plugin/Filter/WebpImage.php +++ b/src/Plugin/Filter/WebpImage.php @@ -89,7 +89,7 @@ class WebpImage extends FilterBase implements ContainerFactoryPluginInterface { /** @var \DOMElement $result */ $rel_path = str_replace('/sites/default/files/', '', $result->getAttribute('src')); - $file_uri = file_build_uri($rel_path); + $file_uri = \Drupal::service('stream_wrapper_manager')->normalizeUri(\Drupal::config('system.file')->get('default_scheme') . ('://' . $rel_path)); // Remove query arguments. $uri = preg_match('/^.*(?:\.)[a-zA-Z]+/m', $file_uri, $matches) ? $matches[0] : $file_uri; $uri = urldecode($uri); diff --git a/webp_extras.info.yml b/webp_extras.info.yml index d7a5be37f6dda997f337b279b1ca234aced2e470..940424998803ab682e8e4c7124568343d3aa8d3e 100644 --- a/webp_extras.info.yml +++ b/webp_extras.info.yml @@ -1,6 +1,6 @@ name: WebP Extra type: module description: "Extra functionalities for the WebP module. Provides a filter to convert images to webp images." -core_version_requirement: ^8.8 || ^9 +core_version_requirement: ^9.3 || ^10 dependencies: - drupal:webp