• zbigniew2026

    (@zbigniew2026)


    Witam,

    Sprawdziłem i działa z serwerem www caddy.

    Kolejność – zainstalowałem CompressX wersja free / wygenerowałem pliki webp, avif.

    Następnie dodałem kod – musi być przed dyrektywą php_fastcgi unix/ …..

    #BEGIN CompressX — wersja z file_exists

    route /wp-content/* {
    @img_avif {
    path_regexp img ^(/wp-content/)(.+).(jpe?g|png|gif|webp)$
    header Accept image/avif
    file {
    try_files /wp-content/compressx-nextgen/{re.img.2}.{re.img.3}.avif
    }
    }
    @img_webp {
    path_regexp img ^(/wp-content/)(.+).(jpe?g|png|gif|webp)$
    header Accept image/webp
    not header Accept image/avif
    file {
    try_files /wp-content/compressx-nextgen/{re.img.2}.{re.img.3}.webp
    }
    }
    handle @img_avif {
    rewrite * /wp-content/compressx-nextgen/{re.img.2}.{re.img.3}.avif
    header Vary Accept
    header Cache-Control "public, max-age=31536000, immutable"
    }
    handle @img_webp {
    rewrite * /wp-content/compressx-nextgen/{re.img.2}.{re.img.3}.webp
    header Vary Accept
    header Cache-Control "public, max-age=31536000, immutable"
    }
    }

    #END CompressX

    Wszystko działa można sprawdzić na www https://test11.16z.eu/

Viewing 1 replies (of 1 total)
  • Plugin Support johnghiz

    (@johnghiz)

    Hello, thanks for testing this out! Don’t hesitate to contact us if you run into any issues.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.