For imgs, they go through the WS img component which has optimization.
Rich text we just output the html as is and apply styles so theres not manipulation to the img url. I can see us supporting this in the future though especially if we add JSON > HTML converters. Maybe it's possible on the Markdown one too