External media optimization


I have two different use cases of images not in the media library, and the problem is identical -> unoptimized images.

1) Images used by third-party plugins, in this case, to display currency (/wp-content/plugins/currency-switcher-woocommerce-pro/assets/images/flag-icons/us.png).
2) Images called from a third party server (https://media.mydomain.com/2020/04/cropped-logo1-32x32.png).

This is of course a real representation of the problem in performance testing. How to solve this?