Hi,
I’ve been asked to help setting up a website, and I suggested the use of Cloudflare and Cloudinary for image hosting. Unfortunately the owner of the web site uploaded very large images, and a typical page weight almost 30 MB. The solution would be to change the Cloudinary URL to apply a transformation, eg:
https://res.cloudinary.com/userid/images/vxxxx/image.png →
https://res.cloudinary.com/userid/images/f_auto,q_auto/vxxxx/image.png
I tried to use REPFlare : GitHub - Darkseal/REPflare: A lightweight Cloudflare Worker to replace text and inject styles and scripts in any web page
// Text replacement configuration ( ‘sourceText’ : ‘replacementText’ )
const textReplacementRules = {
‘userid/images’: ‘userid/images/f_auto,q_auto’
}
As a result the loading of the site becomes really fast, but some icons don’t display anymore. Even if I change the replacement string so that nothing is changed. For example “icon-location-pin-4” doesn’t display.
I can’t understand what is changed, maybe some asynchronous behavior ? The website is based on Wordpress+Elementor+some plugins
Thanks for the help.