LOG IN SIGN UP
Documentation

Overlay Align

Description

The overlay align parameter sets the position of the overlay relative to the image.

API Pattern

Parameter

Parameter Description
overlay-align The position of the overlay relative to the image.

Parameter Values

Value Description
top Align the overlay to the top.
bottom Align the overlay to the bottom.
left Align the overlay to the left.
right Align the overlay to the right.
middle Align the overlay to the middle vertically.
center Align the overlay to the center horizontally.

Notes

  1. By default the overlay is positioned: middle, center

Examples

Align the overlay to the top

sub vcl_recv {
  #FASTLY recv
    if (req.url.qs ~ "overlay") {
      set req.http.X-fastly-imageopto-overlay = "overlay=/img/overlay.png&overlay-align=top";
    }
  return(lookup);
 }

Align the overlay to the bottom right

sub vcl_recv {
  #FASTLY recv
    if (req.url.qs ~ "overlay") {
      set req.http.X-fastly-imageopto-overlay = "overlay=/img/overlay.png&overlay-align=bottom,right";
    }
  return(lookup);
 }