Add user instructions to featured image metabox

For most basic users, image sizes, aspect ratios, and cropping is often misunderstood. Have you ever created a pixel-perfect template for a client, just to have them upload the wrong size images and break the design? I’ve often wondered if having a simple instruction would help eliminate these pesky problems.

Turns out, there is a native WordPress filter that can hopefully help do just that. The ‘admin_post_thumbnail_html’ filter displays directly underneath the featured image metabox in the WordPress admin area. This is a perfect place to display a helpful instruction to help your users upload images that won’t break your design.


// ADD INSTRUCTIONS TO FEATURED IMAGE METABOX
add_filter( 'admin_post_thumbnail_html', 'kpry_add_featured_image_instruction');

function kpry_add_featured_image_instruction( $content ) {
   return $content .= '
Image must be 960px wide x 540px tall and have a transparent background
';
}