Hi, this query parameter is added by default in the admin to help prevent caching from causing issues when an image is changed – without it, the image may not switch to the new image for some time after the image is replaced.
It can be removed via the following (we’d suggest in the?admin_init
?hook since only the admin should be affected by these hooks):
remove_filter('wp_calculate_image_srcset', 'hm_replace_image_calculate_image_srcset');
remove_filter('wp_get_attachment_image_src', 'hm_replace_image_get_attachment_image_src');
remove_filter('wp_prepare_attachment_for_js', 'hm_replace_image_prepare_attachment_for_js');
Is there a reason why you want to remove the query parameter? Is it causing problems?