diff --git a/README.md b/README.md
index 7bf3de5..aca4c34 100644
--- a/README.md
+++ b/README.md
@@ -81,7 +81,7 @@ This package provides a few Blade components for easy integration of Cloudinary
#### Upload Widget
-You can use the ` Blade component that ships with this like so:
+You can use the `` Blade component that ships with this like so:
```blade
@@ -149,7 +149,7 @@ With additional properties:
Basic usage:
```blade
-
+
```
With additional properties:
diff --git a/src/CloudinaryStorageAdapter.php b/src/CloudinaryStorageAdapter.php
index c3d569c..a0184f2 100644
--- a/src/CloudinaryStorageAdapter.php
+++ b/src/CloudinaryStorageAdapter.php
@@ -194,7 +194,12 @@ public function checksum(string $path, Config $config): string
public function prepareResource(string $path): array
{
$info = pathinfo($path);
- $id = $info['dirname'].DIRECTORY_SEPARATOR.$info['filename'];
+
+ // Ensure dirname uses forward slashes, regardless of OS
+ $dirname = str_replace('\\', '/', $info['dirname']);
+ // Always use forward slash for path construction
+ $id = $dirname.'/'.$info['filename'];
+
$mimeType = $this->mimeTypeDetector->detectMimeTypeFromPath($path);
if (strpos($mimeType, 'image/') === 0) {