admin管理员组文章数量:1130349
I have added a couple of custom sizes to my wordpress environment with the following code:
add_image_size( "maximal", "1900" );
add_image_size( "desktop", "1400" );
add_image_size( "tablet", "900" );
add_image_size( "smalltablet", "700" );
add_image_size( "mobile", "500" );
add_theme_support( 'post-thumbnails' );
but when I call an image, the 1900px version is always missing:
<img src="test.laurentwillen.be/pixel.gif" class="attachment-mobile size-mobile wp-post-image" alt="Xiaomi Mi 8 Lite test, avis et prix" srcset=".jpg 500w, .jpg 300w, .jpg 768w, .jpg 1024w, .jpg 1400w, .jpg 900w, .jpg 700w" width="100%">
In the end I see the following formats in my images: 300, 500, 700, 768, 900, 1024, 1400
I should probably remove the old WP sizes but I really don't get why I'm not getting the 1900px format even if I visit a page on a 2k screen. The consequence is that people with a resolution around 1600 and more get lower quality images.
Do you have any idea of what I should do to have those 1900px images ? I already regenerated my thumbnails.
Thanks
Laurent
I have added a couple of custom sizes to my wordpress environment with the following code:
add_image_size( "maximal", "1900" );
add_image_size( "desktop", "1400" );
add_image_size( "tablet", "900" );
add_image_size( "smalltablet", "700" );
add_image_size( "mobile", "500" );
add_theme_support( 'post-thumbnails' );
but when I call an image, the 1900px version is always missing:
<img src="test.laurentwillen.be/pixel.gif" class="attachment-mobile size-mobile wp-post-image" alt="Xiaomi Mi 8 Lite test, avis et prix" srcset=".jpg 500w, .jpg 300w, .jpg 768w, .jpg 1024w, .jpg 1400w, .jpg 900w, .jpg 700w" width="100%">
In the end I see the following formats in my images: 300, 500, 700, 768, 900, 1024, 1400
I should probably remove the old WP sizes but I really don't get why I'm not getting the 1900px format even if I visit a page on a 2k screen. The consequence is that people with a resolution around 1600 and more get lower quality images.
Do you have any idea of what I should do to have those 1900px images ? I already regenerated my thumbnails.
Thanks
Laurent
本文标签: post thumbnailsMissing image size
版权声明:本文标题:post thumbnails - Missing image size 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749138036a2321707.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论