wordpress错误的特色图像大小

时间:2016-02-17 13:27:42

标签: wordpress image dimensions

我遇到一个问题,wordpress会在一篇博客文章中继续调整特色图片的大小。

以下是它正在吐出的html示例:

the_post_thumbnail('large');

<img width="1900" height="849" src="http://127.0.0.1/wp-content/uploads/2016/02/MyImage-1903x850.png" class="attachment-large size-large wp-post-image" alt="MyImage-1903x850" srcset="http://127.0.0.1/wp-content/uploads/2016/02/MyImage-600x268.png 600w, http://127.0.0.1/wp-content/uploads/2016/02/MyImage-1903x850.png 1903w" sizes="(max-width: 1900px) 100vw, 1900px">

如您所见,实际图像尺寸为1903x850。但是,wordpress决定在img标签1900x849

中添加不同的宽度/高度

我尝试过使用regen缩略图并重新上传图像,但它真的很奇怪似乎无法解决为什么会这样。

1 个答案:

答案 0 :(得分:0)

图像缩小,因为当图像实际为1903像素时,最大宽度设置为“1900px”。

相关问题