Hi there,

I am using the picture module with ckeditor and it is loading the picture element fine. The data attributes are being stripped though. I also tried with the latest dev but it didn't make a difference.

At first I thought it was due to ckeditor stripping things out, but the same happens if I disable ckeditor. I also tried removing all filters from my text format with the exception of the picture one and it still happened. The only way these attributes stopped being stripped was if I did not use the picture module input filter.

So to recap, this is what is in there when the node is being edited:
<p><img alt="" data-picture-align="left" data-picture-mapping="half_width" src="/sites/default/files/uploads/images/image.jpg" /></p>

And this is the result:

<p><picture>
<!--[if IE 9]><video style="display: none;"><![endif]-->
<source media="(min-width: 1200px)" srcset="http://website.ca/sites/default/files/styles/half_width_-_large__400xauto_/public/uploads/images/image.jpg?itok=VBsCiEAw 1x"></source>
<source media="(min-width: 768px)" srcset="http://website.ca/sites/default/files/styles/half_width_-_large__400xauto_/public/uploads/images/image.jpg?itok=VBsCiEAw 1x"></source>
<source media="(min-width: 0px)" srcset="http://website.ca/sites/default/files/styles/half_width_-_large__400xauto_/public/uploads/images/image.jpg?itok=VBsCiEAw 1x"></source>
<!--[if IE 9]></video><![endif]-->
<img alt="" srcset="http://website.ca/sites/default/files/styles/thumbnail/public/uploads/images/image.jpg?itok=0u0e_q1G 100w" src="http://website.ca/sites/default/files/styles/half_width_-_large__400xauto_/public/uploads/images/image.jpg?itok=VBsCiEAw">
</picture></p>

Comments

attiks’s picture

Both data-picture-align and data-picture-mapping needs to be added again, let's add class as well

attiks’s picture

Assigned: Unassigned » jelle_s
jelle_s’s picture

Assigned: jelle_s » Unassigned
Status: Active » Fixed

Fixed in latest dev

amysteen’s picture

You rock!

jelle_s’s picture

@amysteen: Thanks! It's comments like that that make my day :-D

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.