Max-width for img tags
Jamroom Developers
We have users dropping in large images within comments (and discussions/blogs) which sometimes go past the maximum width of the text area (and thus are truncated). The natural solution would be to inject style="max-width:100%;" for the img tag.
Unfortunately the html_purifier (called via the update form) strips max-width. I have attempted dissuade html_purifier but ran into the finalization problem discussed years ago on this forum (with no resolution). My guess is that it is still a nightmare to try to influence html_purifier attributes.
So basically I am looking for a suggestion. The question essentially is: how can one get style="max-width:100%;" to remain in effect for img tags that are edited (and thus filtered)?
updated by @tig: 04/29/20 04:34:33AM