Skip to content

Commit 57c75ac

Browse files
authored
Merge pull request #476 from cloudinary/fix/cloudinary-analytics
Remove analytics query arg before saving
2 parents 4a5dc11 + 34eb26a commit 57c75ac

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

php/sync/class-storage.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ public function sync( $attachment_id ) {
189189
switch ( $this->settings['offload'] ) {
190190
case 'cld':
191191
$this->remove_local_assets( $attachment_id );
192-
update_post_meta( $attachment_id, '_wp_attached_file', $this->media->cloudinary_url( $attachment_id ) );
192+
$url = $this->media->cloudinary_url( $attachment_id, false );
193+
$url = remove_query_arg( '_i', $url );
194+
update_post_meta( $attachment_id, '_wp_attached_file', $url );
193195
break;
194196
case 'dual_low':
195197
$transformations = $this->media->get_transformation_from_meta( $attachment_id );

0 commit comments

Comments
 (0)