Skip to content

Commit 0df4337

Browse files
committed
fix: account for directly uploaded images to the DAM when getting the unoptimized URL
1 parent 1dd5adb commit 0df4337

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/traits/normalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function get_unoptimized_url( $url ) {
5353
}
5454
// If the url is an uploaded image, return the url
5555
if ( Optml_Media_Offload::is_uploaded_image( $url ) ) {
56-
$pattern = '#/id:([^/]+)/((?:https?|http)://\S+)#';
56+
$pattern = '#/id:([^/]+)/((?:https?://|http://|directUpload/)\S+)#';
5757
if ( preg_match( $pattern, $url, $matches ) ) {
5858
$url = $matches[0];
5959
}

0 commit comments

Comments
 (0)