Feature-71775-HtmlParserAllowsSrcset.rst 744 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.. include:: ../../Includes.txt

==========================================
Feature: #71775 - HtmlParser allows srcset
==========================================

See :issue:`71775`

Description
===========

The :php:`HtmlParser` - most commonly used when rendering RTE fields
in the frontend - now handles the :html:`srcset` attribute.

A casual use case for this are responsive images:

.. code-block:: html

   <picture>
       <source media="(max-width: 799px)" srcset="small-image.jpg">
       <source media="(min-width: 800px)" srcset="larger-image.jpg">
   </picture>


Impact
======

Using :html:`source` tag with :html:`srcset` attribute is allowed and
:html:`srcset` values are prefixed correctly.

.. index:: Frontend, RTE, ext:core