You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To do this, initially you need to go through all <picture> and look at the presence in it <source>. For example, you can add any attribute to such parents that means that it already contains <source>.
I think it would be better to make it a separate plugin !!! since this is beyond the logic of this plugin
I see, the logic is a bit different indeed.
Are there any documentation on parsing the html ast tree, parent and children nodes? Or is it just a cascade of tree.match ?
Is there any way the plugin could detect the parent node of the image for a
<picture>
element and:<img>
if it is not already in a picture<source>
as a sibling to the generated webp sourceCurrent behaviour
Input:
Output:
Expected behaviour
Use case
This could also be useful when several different plugin are trying to add sources to a picture.
Thanks
The text was updated successfully, but these errors were encountered: