Im brand new to coding in wordpress, usually I use ModX. In ModX there is a plugin called phpthumb which automatically crops images to a specified h and w. How can I achieve this in Wordpress?
<?php $thumbnail_id = get_post_thumbnail_id($post->ID); $thumbnail = wp_get_attachment_image_src($thumbnail_id,'featured works'); echo '<div data-src="'.$thumbnail.'" alt="[[+name]]"></div>'; ?>
Thanks for any insight.