In admin panel use TinyMCE and users are mostly loaded large pictures. Is it possible for the issuance of the text on the fly to compress.
That is, given a variable $text, which contains text plus pictures.
Is there a way to automatically parse the images and resize them before delivery to the customer?
First picture you can limit in size when it is displayed using CSS (max-width), the second — for example nginx has a module for transforming images on the fly (ngx_http_image_filter_module) — but the right decision, of course — resize images when they are loaded on your server.