Subject: [PATCH] Issue #3171559 reroll webp support.
---
Index: src/EventSubscriber/StageFileProxySubscriber.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/EventSubscriber/StageFileProxySubscriber.php b/src/EventSubscriber/StageFileProxySubscriber.php
--- a/src/EventSubscriber/StageFileProxySubscriber.php	(revision 3b1cae72245c1848be8370c08bd2d4f8b21d0ac2)
+++ b/src/EventSubscriber/StageFileProxySubscriber.php	(date 1731333216534)
@@ -110,6 +110,13 @@
     }
 
     $request_path = rawurldecode($request_path);
+    // Webp support.
+    $is_webp = FALSE;
+    if (strpos($request_path, '.webp')) {
+      $request_path = str_replace('.webp', '', $request_path);
+      $is_webp = TRUE;
+    }
+
     // Path relative to file directory. Used for hotlinking.
     $relative_path = mb_substr($request_path, mb_strlen($file_dir) + 1);
     // If file is fetched and use_imagecache_root is set, original is used.
@@ -142,7 +149,7 @@
       // Is this imagecache? Request the root file and let imagecache resize.
       // We check this first so locally added files have precedence.
       $original_path = $this->manager->styleOriginalPath($relative_path);
-      if ($original_path) {
+      if ($original_path && !$is_webp) {
         if (file_exists($original_path)) {
           // Imagecache can generate it without our help.
           return;
