From 34eb26aecd455aa9e38ce803244a72ae175c2a22 Mon Sep 17 00:00:00 2001 From: Marco Pereirinha Date: Mon, 12 Jul 2021 17:45:43 +0100 Subject: [PATCH] Remove analytics query arg before saving --- php/sync/class-storage.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/php/sync/class-storage.php b/php/sync/class-storage.php index c91d4b1c0..5b7de8ef4 100644 --- a/php/sync/class-storage.php +++ b/php/sync/class-storage.php @@ -189,7 +189,9 @@ public function sync( $attachment_id ) { switch ( $this->settings['offload'] ) { case 'cld': $this->remove_local_assets( $attachment_id ); - update_post_meta( $attachment_id, '_wp_attached_file', $this->media->cloudinary_url( $attachment_id ) ); + $url = $this->media->cloudinary_url( $attachment_id, false ); + $url = remove_query_arg( '_i', $url ); + update_post_meta( $attachment_id, '_wp_attached_file', $url ); break; case 'dual_low': $transformations = $this->media->get_transformation_from_meta( $attachment_id );