For friends who understand wordpress, could you give me a hand? I need to modify the size of the images within my content, image within the posts.
I took a resize function here and it works fine, my difficulty is to use this function within my functions to resize the thumbs within the post.
I tried to elaborate a function but it is not working, could someone tell me how to function this function?
function resizeThumb($html, $post_id, $post_thumbnail_id, $size, $attr){
$image = get_post_thumbnail_id();
$thumb = vt_resize( $image, '', 850, 600, true );
$html = '<img src="' . $thumb[url] . '" alt="' . $alt . '" class="img-responsive" />';
return $html;
}
add_filter( 'post_thumbnail_html', 'resizeThumb', 10, 5 );