diff --git a/php/sync/class-storage.php b/php/sync/class-storage.php index 1cbb1ae54..22592dcbb 100644 --- a/php/sync/class-storage.php +++ b/php/sync/class-storage.php @@ -452,6 +452,7 @@ public function unique_filename( $filename, $ext, $dir ) { public function ensure_metadata( $data, $attachment_id ) { if ( defined( 'REST_REQUEST' ) && true === REST_REQUEST ) { if ( isset( $data['sizes'] ) && 'cld' === $this->media->get_post_meta( $attachment_id, Sync::META_KEYS['storage'], true ) ) { + $data['file'] = path_join( dirname( $data['file'] ), $data['original_image'] ); unset( $data['original_image'] ); } }