We’re running Cloudflare with a Pro account on a Wordpress site with all Cloudflare > speed settings activated including Image Resizing.
Can Cloudflare (possibly by Workers) see tags in our html and rewrite them into the srcset version with those assets served from Cloudflare’s CDN? For instance from…
<img src="myimage.jpg" alt="this is an image">
to
<img srcset="myimage.jpg 480w, myimage.jpg 800w" sizes="(max-width: 600px) 480px,
800px" src="myimage.jpg" alt="this is an image" />
This would be a big speed boost to our site.
Usually Wordpress does intercept tags and rewrite them with srcset. But we’re serving raw html from a custom post type that does not go through Wordpress’ usual the_content filter.
We’re wondering if Cloudflare, maybe through Workers, can accomplish this.
Just turning on Cloudflare Image Resizing didn’t change the html we see on cached pages. It’s still like
<img src="myimage.jpg" alt="this is an image">