Skip to content

MaxAnimationFrameResolution

Limits the resolution of a single frame of animated sources. It overrides the imgproxy configuration.

imgproxy: max_animation_frame_resolution (alias mafr) · Availability: all editions

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

The option appears in the URL as mafr:2.

Parameter Type Default Description
$resolution int required Maximum resolution in megapixels.
  • imgproxy only honors this option when IMGPROXY_ALLOW_SECURITY_OPTIONS is enabled.

imgproxy reference