Loading
Enhance PathProcessorImageStyles to handle empty directory paths correctly and...
Enhance PathProcessorImageStyles to handle empty directory paths correctly and add unit tests for inbound image style path processing.
[Closes #3616475](https://www.drupal.org/project/drupal/issues/3616475
PathProcessorImageStyles::processInbound() builds the public image style prefix from the public stream wrapper directory path. An empty directory path produced a //styles/ prefix. Incoming paths use /styles/, so the processor did not rewrite them.
This change collapses repeated leading slashes. An empty directory path now yields /styles/.
A unit test covers processInbound() when the public directory path is empty. It also covers the default public path, private image styles, and unrelated paths.
Generated with the help of an LLM.)
Edited by Luis