From d936944c4e4907b69dd0f9f16f1bf278b6bed856 Mon Sep 17 00:00:00 2001 From: selul Date: Wed, 10 Apr 2019 10:36:55 +0300 Subject: [PATCH] feat(api): adds filter before url replacement, for individual image args --- inc/url_replacer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/inc/url_replacer.php b/inc/url_replacer.php index d4cd7c33..cdef7065 100644 --- a/inc/url_replacer.php +++ b/inc/url_replacer.php @@ -161,6 +161,8 @@ public function build_image_url( $args['height'] = $args['height'] > $this->max_height ? $this->max_height : $args['height']; } + $args = apply_filters( 'optml_image_args', $args, $original_url ); + $new_url = ( new Optml_Image( $url, $args ) )->get_url( [ 'signed' => $this->settings->use_lazyload() ? false : $this->is_allowed_site,