It would be better to change the default "width" attribute for a data-width one to define the default size of the image. It's a bad practict to use width and height attributes on images. (if you scan your website on dareboost, it will be reported as a problem).
Even better option, let user configure the attribute they want in backoffice. You already allow to add a class, etc... for lazyload integration. Would be cool to be able to change that "width" attribute.
Thanks for your feedback. The ResponsiveImages plugin currently does not set a width or height attribute. All it does is to generate resized image copies and add a sizes attribute to your image tag. If there is a width attribute on your image it was there before the plugin did it's work.
Maybe another plugin or the wysiwyg editor has added it?
Yes, the plugin don't add any width attribute, but it seems that it read the width attribute you set to define the size of the default image. Let me explain :
I have a 1000 x 1000px image, I defined 3 breakpoints in my srcset : 400, 800, 1200, my image is in a container that have a width of 250px.
And this is what I expect, as my container is 250px large, I would like to be able to load the correct image (the 400 px one as my max-width is 250 and the nearest defined breakpoint is 400).
The problem is : To do that, I have to use the width attribute, which is not recommanded. I would like to be able to use a neutral (data-width) or something else, but not width.
Didn't look at the code, but it seems the plugin read the width attribute to set the max-width under the size attribute. That is the purpose of my post.