Skip to content

Commit ad51973

Browse files
Update priority for prime attachement cache
1 parent 69ac2e1 commit ad51973

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

plugins/auto-sizes/hooks.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,8 @@ function auto_sizes_prime_attachment_caches( $content ): string {
183183
return $content;
184184
}
185185

186-
/*
187-
* The priority 6 is used to ensure the new filter runs right after the "wp-image-$attachment_id" class
188-
* is added to the img tag at priority 5, allowing modifications that rely on this class being in place.
189-
*/
190-
add_filter( 'the_content', 'auto_sizes_prime_attachment_caches', 6 );
186+
// This must run before 'do_blocks', which runs at priority 9.
187+
add_filter( 'the_content', 'auto_sizes_prime_attachment_caches', 9 );
191188

192189
/**
193190
* Filter the sizes attribute for images to improve the default calculation.

0 commit comments

Comments
 (0)