Skip to content

Commit

Permalink
#4452 Added in 1.0.50
Browse files Browse the repository at this point in the history
  • Loading branch information
Zabi09 committed May 15, 2020
1 parent c6932d7 commit 1cc943d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/features.php
Original file line number Diff line number Diff line change
Expand Up @@ -7789,7 +7789,7 @@ function ampforwp_short_pixel_cdn($content){
$compress_level = '+q_glossy';
}
$compress_level .= '+ret_img+to_webp/';
$content = preg_replace('/<amp-img(.*?)src="(.*?)" width="(.*?)" height="(.*?)"(.*?)srcset="(.*?)"(.*?)<\/amp-img>/', '<amp-img$1 src="'.$api_url.'/w_$3'.$compress_level.'$2"width="$3"height="$4"$7</amp-img>', $content);
$content = preg_replace('/<amp-img(.*?)src="([^"]*)"(.*?)width="([^"]*)" height="([^"]*)"([^>]*)>/','<amp-img$1 src="'.$api_url.'/w_$4'.$compress_level.'$2"$3 width="$4" height="$5"$6>',$content);
return $content;
}
if(ampforwp_get_setting('ampforwp_css_tree_shaking') == true && ampforwp_is_gutenberg_active()){
Expand Down

0 comments on commit 1cc943d

Please sign in to comment.