How to blur the_post_thumbnail() via blur.js (jquery)?

I figured it out. blur.js needs an background-image to work. i had to set the image as background separately: <?php $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘full’ );?> <a href=”https://wordpress.stackexchange.com/questions/210956/<?php echo $imageLink; ?>”> <div class=”testbg” style=”background-image: url(‘<?php echo $thumb[‘0′];?>’)”> <?php the_post_thumbnail(); ?> </div> </a>

insert thumbnail image from php script

You’ll want to take a look at wp_insert_attachment and wp_generate_attachment_metadata. You can’t insert a featured image/thumbnail using the_post_thumbnail – that function only gets the thumbnail for the current post. See: http://codex.wordpress.org/Function_Reference/wp_insert_attachment and http://codex.wordpress.org/Function_Reference/wp_generate_attachment_metadata