X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fimage%2Fsrc%2FPathProcessor%2FPathProcessorImageStyles.php;fp=web%2Fcore%2Fmodules%2Fimage%2Fsrc%2FPathProcessor%2FPathProcessorImageStyles.php;h=f40d083ac4824d8358a90e52a8cf283688d6461b;hp=5fdbd2f5eca2c782a015b7d035122dbf672598c8;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/image/src/PathProcessor/PathProcessorImageStyles.php b/web/core/modules/image/src/PathProcessor/PathProcessorImageStyles.php index 5fdbd2f5e..f40d083ac 100644 --- a/web/core/modules/image/src/PathProcessor/PathProcessorImageStyles.php +++ b/web/core/modules/image/src/PathProcessor/PathProcessorImageStyles.php @@ -48,8 +48,11 @@ class PathProcessorImageStyles implements InboundPathProcessorInterface { if (strpos($path, '/' . $directory_path . '/styles/') === 0) { $path_prefix = '/' . $directory_path . '/styles/'; } - elseif (strpos($path, '/system/files/styles/') === 0) { + // Check if the string '/system/files/styles/' exists inside the path, + // that means we have a case of private file's image style. + elseif (strpos($path, '/system/files/styles/') !== FALSE) { $path_prefix = '/system/files/styles/'; + $path = substr($path, strpos($path, $path_prefix), strlen($path)); } else { return $path;