Overlay repeat

      Last updated May 18, 2020

    The overlay-repeat parameter sets how the overlay image will be repeated.

    API Pattern

    Parameter

    Parameter Description
    overlay-repeat How the overlay image will be repeated.

    Parameter Values

    Value Description
    x The overlay image will be repeated only horizontally.
    y The overlay image will be repeated only vertically.
    both The overlay image will be repeated both horizontally and vertically.

    Examples

    Repeat the overlay horizontally

    1
    2
    3
    4
    5
    6
    7
    
    sub vcl_recv {
      #FASTLY recv
        if (req.url.qs ~ "overlay") {
          set req.http.X-fastly-imageopto-overlay = "overlay=/img/overlay.png&overlay-repeat=x";
        }
      return(lookup);
     }
    

    Repeat the overlay both horizontally and vertically

    1
    2
    3
    4
    5
    6
    7
    
    sub vcl_recv {
      #FASTLY recv
        if (req.url.qs ~ "overlay") {
          set req.http.X-fastly-imageopto-overlay = "overlay=/img/overlay.png&overlay-repeat=both";
        }
      return(lookup);
     }
    
    Back to Top