Why is my upload / Select media library button empty?

I have found out that you can’t defer the javascript loading on the whole site or it will mess up some contents on the backend.
I have to check if the page is the backend or the frontend and block the function just for backend with if (!(is_admin() )).

if (!(is_admin() )) {
    function defer_parsing_of_js ( $url ) {
        if ( FALSE === strpos( $url, '.js' ) ) return $url;
        if ( strpos( $url, 'jquery.js' ) ) return $url;
        // return "$url' defer ";
        return "$url' defer onload='";
    }
    add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );
}