VIP-Coding-Standards
VIP-Coding-Standards copied to clipboard
Report on code attempting to set image quality for VIP Go File service to 100
We might want to start with something simple, prone to false positives. Eg.: reporting a Warning on every $var['quality'] = 100; or $var['quality'] = '100'.
I would strongly encourage that they go with 95 or below
was mentioned here so perhaps we should have this catch anything above 95 rather than just 100?
Or would it be better to flag for the filter vip_go_image_resize_pre_args and do a manual inspection for quality > 95?
add_filter( 'vip_go_image_resize_pre_args', 'image_quality_filter' );
function image_quality_filter( $args ) {
$args['quality'] = 100;
}
Adding jetpack_photon_pre_args to the list of hooks to flag for...