こんばんは、Wordpress初心者です。
ブログ(Wordpress)のサムネイル画像をTwitterで表示させる際に画像がぼやけてしまいます。
解決方法をご存知の方がいらっしゃいましたらご教授いただけますと幸いです。
Wordpressのサムネイル画像をそのまま引用しているため
Twitterで大きく表示させる際にぼやけてしまうのでしょうか...?
該当URL
・ブログ: http://availability89.com/
・Twitter: https://twitter.com/naosukenya
★メタ部コード(header.php)
<!-- header --><meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@naosukenya" /> <meta name="twitter:title" content="<?php the_title(); ?>" /> <meta name="twitter:description" content="<?php echo get_post_meta($post->ID, _aioseop_description, true); ?>" /><header itemscope itemtype="http://schema.org/WPHeader"> <div id="header" class="clearfix"> <div id="header-in"> <?php if(is_single()): ?>
<meta name="twitter:image" content="<?php if(has_post_thumbnail( $post->ID )): $thumbnail_id = get_post_thumbnail_id(); $thumbnail_img = wp_get_attachment_image_src( $thumbnail_id , 'thumbnail' ); echo $thumbnail_img[0]; else: echo ""; endif; ?>" />
<?php endif; ?> <?php //カスタムヘッダーがある場合 // $h_top_style = ''; // if (get_header_image()){ // $h_top_style = ' style="background-image:url('.get_header_image().')"'; // } ?> <div id="h-top"<?php //echo $h_top_style; ?>> <?php get_template_part('button-menu'); //モバイルメニューボタンの呼び出し?> <div class="alignleft top-title-catchphrase"> <?php get_template_part('header-logo');?> </div> <div class="alignright top-sns-follows"> <?php if ( is_top_follows_visible() ): //トップのフォローボタンを表示するか?> <?php get_template_part('sns-pages'); //SNSフォローボタンの呼び出し?> <?php endif; ?> </div> </div><!-- /#h-top --> </div><!-- /#header-in --> </div><!-- /#header --> </header>
回答1件
あなたの回答
tips
プレビュー