Skip to content

Commit 6b8c7ee

Browse files
rani-webkulrani-webkul
authored andcommitted
Resolved select from gallery option not working in theme design configuration #24430
1 parent db43c11 commit 6b8c7ee

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Theme/Model/Design/Backend

1 file changed

+1
-1
lines changed

app/code/Magento/Theme/Model/Design/Backend/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ private function getMime()
247247
*/
248248
private function getRelativeMediaPath(string $path): string
249249
{
250-
return preg_replace('/\/(pub\/)?media\//', '', $path);
250+
return preg_split('/\/(pub\/)?media\//', $path)[1] ?? preg_replace('/\/(pub\/)?media\//', '', $path);
251251
}
252252

253253
/**

0 commit comments

Comments
 (0)