How to output WP_Customize_Cropped_Image_Control setting?

The theme mod here is storing the attachment post ID whereas your default value is a URL. So what you’d need to do is something like:

<?php
function get_bio_image_url() {
    if ( get_theme_mod( 'bio_image' ) > 0 ) {
        return wp_get_attachment_url( get_theme_mod( 'bio_image' ) );
    } else {
        return get_template_directory_uri() . '/images/default.jpg';
    }
}
?>
<img src="https://wordpress.stackexchange.com/questions/249003/<?php echo esc_url( get_bio_image_url() ); ?>">

Leave a Comment