admin管理员组文章数量:1122846
Below is the code i used to set my thumbnail sizes. The Only problem I'm having is that my thumbnails won't resize to fit the size below or the <div>
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 760, 330, true ); // Normal post thumbnails
Some images may be small but shouldn't they stretch themselves to proportion to fit the thumbnail size specified in the code above. Can any one tell me hop i can accomplish this. I have also tried adding a thumbnail size and calling it and it still didn't work.
I have also used the 'Thumbnail Regenerator' plugin to regenerate size, but they still don't fit. Why is this.
Here is an example below, notice that the second thumbnail doesn't fit.
Below is the code i used to set my thumbnail sizes. The Only problem I'm having is that my thumbnails won't resize to fit the size below or the <div>
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 760, 330, true ); // Normal post thumbnails
Some images may be small but shouldn't they stretch themselves to proportion to fit the thumbnail size specified in the code above. Can any one tell me hop i can accomplish this. I have also tried adding a thumbnail size and calling it and it still didn't work.
I have also used the 'Thumbnail Regenerator' plugin to regenerate size, but they still don't fit. Why is this.
Here is an example below, notice that the second thumbnail doesn't fit.
Share Improve this question asked Oct 17, 2014 at 20:14 user32447user32447 8351 gold badge12 silver badges16 bronze badges 1- "Some images may be small but shouldn't they stretch themselves to proportion to fit the thumbnail size specified in the code above." ... if they are smaller then the content, then they won't get upscaled (and if, then only with a decent loss of quality). – kaiser Commented Oct 18, 2014 at 1:43
1 Answer
Reset to default 0change true to false in set_post_thumbnail_size( 760, 330, true )
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 760, 330, false );
This will make it not crop automatically.
本文标签: Post thumbnail won39t resize to fit
版权声明:本文标题:Post thumbnail won't resize to fit 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736304949a1932417.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论