如何在img中添加大小参数?

时间:2019-05-02 20:32:58

标签: php wordpress jpeg

如何在wordpress图片中添加尺寸参数?

我用于缩略图的代码是:

if (has_post_thumbnail())
{
    the_post_thumbnail('full');
}

我只想更改图片的网址

<img src="website.com/wp-content/uploads/img.jpg">

<img src="website.com/wp-content/uploads/img.jpg?size=10">

1 个答案:

答案 0 :(得分:1)

使用get_the_post_thumbnail_url()仅获取帖子图片的URL,并使用该URL创建一个window.addEventListener('devicemotion', onDeviceMotion, true); function onDeviceMotion(event) { let x = event.accelerationIncludingGravity.x; let y = event.accelerationIncludingGravity.y; let z = event.accelerationIncludingGravity.z; } 标签。

<img />