Disable srcset in WP

Lately i noticed that pictures i uploaded are a bit blurry and when i checked my code using firebug i noticed some srcset in my images
This is a new feature in WP used for responsive images but i guess they need to work on it a bit. If you wish to disable it
Add the following to your functions.php in the root of your theme folder
/* Show future posts */
function disable_srcset( $sources ) {
return false;
}
add_filter( ‘wp_calculate_image_srcset’, ‘disable_srcset’ );

Disable srcset, srcset, wordpress tutorial


Nemanja Radevic

Wordpress expert Joomla expert Front end development expert Warp Framework expert Responsive design

© Radevic Team. All rights reserved. Powered by YOOtheme.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.