Add filter on certain thumbnail sizes only

This is a hack, but I guess it should work… add_filter( ‘wp_get_attachment_image_attributes’, ‘wpse8170_add_lazyload_to_attachment_image’, 10, 2 ); function wpse8170_add_lazyload_to_attachment_image( $attr, $attachment ) { //use your image size here with attachment if($attr[‘class’] == ‘attachment-large’){ //do your stuff } return $attr; }

Getting featured image setting as background

There are some mistakes in the code you are using (AFAIK): get_post_thumbnail_id($post->ID, ‘ttrust_post_thumb_big’) only has one parameter, that is post_id. So, it should just be get_post_thumbnail_id($post->ID) ” — there’s no 4th parameter for wp_get_attachment_image_src array( 5600,1000 ) defines the $size of the image you want to be shown. You should be using ‘large’ (string) since … Read more

“Use as featured image” not working , “Set Featured Image” hangs. GoDaddy Issue [closed]

What the problem was:- My wordpress installation is hosted on GoDaddy GoDaddy was hacked a couple of weeks back. Apparently godaddy has put some restirctions ( The reason why featured image feature was not working ) Workaround:- ( Tested only on google chrome. ) Please go to https://chrome.google.com/webstore and search for ” Edit this cookie … Read more