Loading src/FlushSingleImage.php +5 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,11 @@ class FlushSingleImage implements FlushSingleImageInterface { if (is_file($style_path) && file_exists($style_path)) { $style_paths[] = $style_path; } $path_parts = pathinfo($style_path); $style_path_webp = $path_parts['dirname'] . '/' . $path_parts['filename'] . '.webp'; if (is_file($style_path_webp) && file_exists($style_path_webp)) { $style_paths[] = $style_path_webp; } } return $style_paths; Loading src/Form/FlushSingleImageForm.php +1 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ class FlushSingleImageForm extends FormBase { */ public static function checkStyles(array &$form, FormStateInterface $form_state) { $paths = \Drupal::service('flush_single_image')->flush($form_state->getValue('path')); $paths = \Drupal::service('flush_single_image')->getStylePaths($form_state->getValue('path')); if ($paths) { $element = [ Loading Loading
src/FlushSingleImage.php +5 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,11 @@ class FlushSingleImage implements FlushSingleImageInterface { if (is_file($style_path) && file_exists($style_path)) { $style_paths[] = $style_path; } $path_parts = pathinfo($style_path); $style_path_webp = $path_parts['dirname'] . '/' . $path_parts['filename'] . '.webp'; if (is_file($style_path_webp) && file_exists($style_path_webp)) { $style_paths[] = $style_path_webp; } } return $style_paths; Loading
src/Form/FlushSingleImageForm.php +1 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ class FlushSingleImageForm extends FormBase { */ public static function checkStyles(array &$form, FormStateInterface $form_state) { $paths = \Drupal::service('flush_single_image')->flush($form_state->getValue('path')); $paths = \Drupal::service('flush_single_image')->getStylePaths($form_state->getValue('path')); if ($paths) { $element = [ Loading