• My website is only serving WEBP, why?
    I already made the support settings on my cloudflare, even though I’m not so sure I did it correctly, but I think it didn’t work out, how do I solve this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @makobaby01 – please check my recent comment related to Cloudflare and WebP. Basically, if you are using the edge cache page rule, you should not use WebP express.

    P.S. I am not related to dev, just sharing my own experience.

    Thread Starter makobaby01

    (@makobaby01)

    @ashucg interesting your comment, however, if you assist me in doing the following, oblige to use <picture> in all , thus ensuring that it will serve .jpg for browsers not allowed, and serve webp for browsers that support, in theory this would not affect with cloudflare, since it is a change in code, but how would I do it in code?
    Like using imagemagik (I can’t remember the name) which is a conversion via php to webp, would that also change for the case of cloudflare?

    Hi @makobaby01

    but how would I do it in code?

    If you are talking about templates, you don’t have to if you continue using WebP express with alter HTML option enabled. It will automatically update the HTML for you.

    Like using imagemagik (I can’t remember the name) which is a conversion via php to webp, would that also change for the case of cloudflare?

    It is (in a way) the same functionality this plugin offers if you are talking about creating a PHP script to dynamically return image (or convert if WebP does not exist) based on browser support. The only advantage that I can think of is that you can actually create a page rule and exclude that script from server cache. But this would mean that you have to manage the conversion and basically update image URLs using filters. It is possible but then you also have to consider CSS & JS.

    I would recommend you to read my other comment. I think you can use the service worker approach here for best results. That way, you don’t have to worry about Cloudflare edge cache rules, modifying HTML code or anything like that.

    Hi @makobaby01

    My previous comment in under moderation. Long story short:

    I would recommend you to read my other comment. I think you can use the service worker approach here for best results. That way, you don’t have to worry about Cloudflare edge cache rules, modifying HTML code or anything like that.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Not serving jpg images when browser does not support’ is closed to new replies.