Skip to content

Commit

Permalink
feat(api): adds filter before url replacement, for individual image args
Browse files Browse the repository at this point in the history
  • Loading branch information
selul committed May 29, 2019
1 parent 2ef2212 commit d936944
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/url_replacer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d936944

Please sign in to comment.