WordPress Tweaks

Wiki.TerraBase.info
Revision as of 20:10, 14 February 2022 by Root (talk | contribs) (Created page with "Disabling unnecessary or unneeded functionality: https://design2seo.com/blog/web-development/wordpress/disabling-unused-wordpress-features/ Change the allowable image upload size in a Child Theme's functions.php file;<syntaxhighlight lang="text"> function new_srcset_max($max_width) { return 16384; } add_filter('max_srcset_image_width', 'new_srcset_max'); </syntaxhighlight>When WordPress creates "Thumbnails" (AKA Alternative Image Sizes (AIS(s)), the default quality...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

Change the allowable image upload size in 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;' ) );