[wp-trac] [WordPress Trac] #34807: Image tags without ending slash are never made responsive.
WordPress Trac
noreply at wordpress.org
Sat Nov 28 01:45:23 UTC 2015
#34807: Image tags without ending slash are never made responsive.
--------------------------+-----------------------------
Reporter: programmin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords:
Focuses: performance |
--------------------------+-----------------------------
If a page has this content:
{{{
<div>some content</div>
<div style="text-align: right;">more content</div>
<div style="text-align: center;">
<img class="alignnone size-full wp-image-2457"
src="http://localhost/wordpress/wp-content/uploads/2015/11/IMG1275.jpg"
alt="IMG1275" width="1536" height="2048">
</div>
}}}
the srcset is never added to the image - maybe a bug in
wp_make_content_images_responsive() or get_media_embedded_in_content() as
it returns empty array.
However, when I add an ending /> or </img> to the img tag it fixes it and
I see srcset and responsive images.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34807>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list