get_the_post_format_image() should use filtered content for image extraction
|Reported by:||ethitter||Owned by:|
Any plugin that modifies image paths through the image_downsize and the_content filters prevents get_the_post_format_image() from properly removing the first parsed image from the content later passed to get_the_remaining_content().
When get_the_post_format_image() parses post content to extract an image, the content is accessed directly from the $post global without applying the the_content filter. In the case of a user with a CDN plugin such as Jetpack Photon enabled, this causes the string replacement meant to strip out the first image to fail because the image path returned by wp_get_attachment_image_src() is modified through the image_downsize filter. Since the corresponding filter hooked to the_content hasn't modified the content the string replacement is applied to, the parsed image isn't removed from the content.