Froala RTE setting style attribute on resized images.
We have our images in the media library at bigger sizes than we use on our article pages for example. We want to avoid having to upload multiple sizes of the same image and then use Kentico's built in image resize/caching feature to request the apropriatedly sized image (by passing the width url parameter in the image url).
The problem we are having is that Froala sets a style attribure on the <img> rather than appending the width/height to the url when using the resize image button. This, not only sends us the bigger sized image but also messes up our responsive mobile layouts. Ideally our editors could use this Froala resize feature rather than having to edit the html.
I would say that this "style" attribure default is rendering Kentico's nice on-the-fly image resize feature useless for regular content editors by working this way.
I looked into Froala's documentation to see if there was an option to change this default but I don't think there is one. If anyone had customized or found the setting please let me know.
Environment
- Xperience by Kentico version: [28.1.1]
- .NET version: [6]
- Deployment environment: [Azure]
- Froala image.setSize method documentation
Answers
@fcalvo
Hmm, I don't know of any simple solution here. Froala plugins can be a little tricky to develop, though we do have the basics documented.
If you don't find any easy solution, I'd recommend giving us some feedback on our roadmap (blue "+ Submit idea" button in the top right) for this feature.
To answer this question, you have to login first.