Skip to content

Commit 854bc2a

Browse files
committed
Provide fix for the toor placed images
1 parent 7eedc82 commit 854bc2a

File tree

1 file changed

+3
-1
lines changed
  • app/code/Magento/MediaGallery/Plugin/Wysiwyg/Images

1 file changed

+3
-1
lines changed

app/code/Magento/MediaGallery/Plugin/Wysiwyg/Images/Storage.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ public function afterDeleteDirectory(StorageSubject $subject, $result, $path)
116116
*/
117117
private function getMediaDirectoryRelativePath(string $path): string
118118
{
119-
return $this->filesystem->getDirectoryRead(DirectoryList::MEDIA)->getRelativePath($path);
119+
$relativePath = $this->filesystem->getDirectoryRead(DirectoryList::MEDIA)->getRelativePath($path);
120+
121+
return (false === strpos($relativePath, '/')) ? '/' . $relativePath : $relativePath;
120122
}
121123
}

0 commit comments

Comments
 (0)