+ /**
+ * {@inheritdoc}
+ */
+ public function supportsUri($uri) {
+ // Only support the URI if its extension is supported by the current image
+ // toolkit.
+ return in_array(
+ Unicode::strtolower(pathinfo($uri, PATHINFO_EXTENSION)),
+ $this->getImageFactory()->getSupportedExtensions()
+ );
+ }
+