WordPress Tweaks

Revision as of 08:26, 15 February 2022 by Root (talk | contribs)

Disabling unnecessary or unneeded functionality: https://design2seo.com/blog/web-development/wordpress/disabling-unused-wordpress-features/

Change the allowable image size put in an HTML SRCSET Attribute size (of course 16384 is a fairly large screen) setting into a Child Theme's functions.php file;

function new_srcset_max($max_width) {
    return 16384;
}

add_filter('max_srcset_image_width', 'new_srcset_max');

When WordPress creates "Thumbnails" (AKA Alternative Image Sizes (AIS(s)), the default quality compression is set to 85% (supposedly). The below setting in a Child Theme's functions.php file preserves 100% quality;

add_filter( 'jpeg_quality', create_function( '', 'return 100;' ) );