Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @issacchua

    Sorry, I missed your previous replies on the other topic.
    If I had any information about this I would share it with you immediately.
    So far, we were unable to replicate the problem, and we are testing more. So to clarify, images are served as webp.
    Once I have more information and also, once I am able to replicate the problem and see what may be causing it, I will share the solution with you momentarilly.
    Thank you for your patience.

    Thread Starter issacchua

    (@issacchua)

    Thanks for you reply.

    Is there anywhere else that I can look into on my own to further troubleshoot this issue?

    To iterate the problem, this problem only happened when I choose to offload images from cloudfront (s3 origin) , if I disable Cloudfront, webp images are served locally without any problem. Webp images are uploaded to S3 as well.

    I suspect it has something to do with redirection. When disabling CDN, the nginx is able to handle the redirection to webp images by using try_files method. However, with CDN enabled, the images are actually loaded from Cloudfront and hence no such try_files functionality applied.

    Please let me know if you have anything that can help me with solving this issue, thanks!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @issacchua

    Well, this is what we are trying to find out.
    We need to double-check the AWS CDN settings. Because in our testing the images are served as webp.
    As soon as I have more information I’ll make sure to share it with you asap!
    Thanks!

    Thread Starter issacchua

    (@issacchua)

    Thanks @vmarko , I will be waiting!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @issacchua

    Thank you for your patience.
    We can confirm the issue with the webp rewrite and AWS Cloudfront.
    AWS serves the original format image instead of seeing the request headers and serving WebP if the accept header allows it. AWS has an API Gateway and Lambda function ability. It would be possible to configure a route to have script check headers and act like a rewrite, but it may be very difficult to achieve. It may also cost more money to go through those services.
    The issue is that when a cached page is served by CloudFront, it serves the original image format and there is no rewrite to check if a WebP exists.
    We may be able to enhance the feature in the future by using src-set or picture HTML elements.
    Thanks again.

    Thread Starter issacchua

    (@issacchua)

    Hi Marko,

    Thanks for your reply. Is it possible to do it in a simpler way, which we load the image of .webp extension directly?

    For example, I have both .jpg and .webp same image file in the media library, if I choose to show .webp image, then we load the image with .webp extension as opposed to what the current state is (file extension shows .jpg but load content-type image/webp ).

    Thanks again!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @issacchua

    Thank you for your patience.
    I’ve made some more tests and unfortunately, the problem is with the fact that AWS serves the original format image instead of seeing the request headers and serving WebP if the accept header allows it.
    As I’ve also mentioned before, we will be working on a fix for this by possibly using the picture HTML elements when AWS is used.
    Thanks!

    Thread Starter issacchua

    (@issacchua)

    Hello @vmarko ,

    Thanks for your reply. Does it mean that the next version this issue will be fixed right?

    Thanks ??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Follow up on previous post’ is closed to new replies.