I’m using images from pexel.com with added parameters to the URL to make them smaller and auto-optimized…
This sounds just like Jetpack’s Photon feature, that you enabled by checking the “Speed up images and photos” option; the 2 services most likely work the same way.
Here is an example of how Photon works on my own site:
- I inserted the following image in one of my posts:
https://jeremy.hu/wp-content/uploads/DSC_2191.jpg. The image is quite big (1.9MB). Its dimensions are also the original dimensions I got when taking the picture: 3724x2095px.
- Since my theme’s content width is 700px, I don’t actually need such a big image. Jetpack’s Photon service takes the image, compresses it, optimizes it, and generates a new, resized version of the image that is then used in the post:
https://i1.wp.com/jeremy.hu/wp-content/uploads/DSC_2191.jpg?resize=700%2C394. That image is a lot smaller in size (57.9KB), and its dimensions match what’s needed in my theme: 700x394px.
- If I were to visit my site from a Retina / HiDPi device like a Macbook, an iPhone, or a recent Android device, Photon would serve an image matching the pixel density needed by that device.
This all happens behind the scenes, for all the images on your site, even those served from another domain, as soon as you activate the option under Jetpack > Settings.
It should also be compatible with other similar services, but if you find that it serves the original image instead of the resized image on your site, something could definitely be improved.
Could you give me an example of one of the images as they appear on your site right now, when Photon is not active, so I can run some tests?
Thanks!