Overlay

      Last updated May 18, 2020

    The overlay parameter overlays one image on top of another image.

    API Pattern

    Parameter

    Parameter Description
    overlay Root-relative URL.
    overlay-base64 Base64 encoded root-relative URL.

    Parameter Values

    Value Description
    string Root-relative URL.

    Notes

    1. By default the overlay will overlay-align center, middle.

    Examples

    Overlay

    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";
        }
      return(lookup);
     }
    

    Base64 encoded overlay

    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-base64=L2ltZy9vdmVybGF5LnBuZw==";
        }
      return(lookup);
     }
    
    Back to Top