Skip to content

Page

Selects the page or frame of a multi-page or animated source.

imgproxy: page (alias pg) · Availability: imgproxy Pro only

use SomehowDigital\ImgProxy\Url;
use SomehowDigital\ImgProxy\Option\Page;
$url = Url::create()
->source('https://example.com/image.jpg')
->options(new Page(1));
$url->build();
// _/pg:1/plain/https%3A%2F%2Fexample.com%2Fimage.jpg

The option appears in the URL as pg:1.

Parameter Type Default Description
$page int required Zero-based index of the page.
  • Negative values throw an InvalidArgumentException.

imgproxy reference